The Less compiler merges the different Less source files into a single CSS file. This file has been minified in most cases. When you are inspecting the source of the CSS files with the developer tools of your browser, you cannot relate the style effects to your original Less code. The CSS source maps solve this problem by mapping the combined/minified file back to its unbuilt state.
Currently, the less.js
client-side compiler does not support the SourceMap
option, so you will need the command-line compiler lessc
to generate CSS source maps. The Installing the lessc compiler with npm recipe in Chapter 1, Getting to Grips with the Basics of Less, shows you how to use the command-line compiler. Note that this recipe also requires you to use the latest version of Google Chrome or the Mozilla Firefox web browser. The developer tools of both browsers support CSS source maps now.