I'm trying to compile a set of .less files, and generate individual source maps in the process. I have about 20 source files currently, and so I'm using dynamic expansion to load them all in.
I would then like the file compiled to css (works), and an individual source map generated for each (doesn't work)
file_x.less -+--> file_x.css (YAY)
|
|--> file_x.css.map (NAY)
It seems that getting source mapping to work is tricky to start with, but appears not to work at all for multiple, individual files.
So, does anyone know of an easy, snap-in alternative? If not, my next solution is to try shell out and call lessc natively, but I'd rather not if I can avoid that.
Edit: This will be used for both development and production
I don't know of any packages that currently do this. With grunt-contrib-less, though the way I ended up solving this issue for myself was by inlining the sourcemaps in the CSS by setting
outputSourceFiles: true
In my experience this is actually the most convenient way to handle your maps anyway. The only downside is that it will require that you have a minifier set up, since inlining the maps will likely more than double the size of your CSS files.