Search code examples
sassgruntjssource-maps

Copy map file on grunt with sass


I'm using usemin when building with grunt, and I use the following tasks on css: sass, concat, cssmin.
Is it possible to have a map file in the end in order to debug the code after it's built?
Thanks.


Solution

  • All these tasks support a map (usually through a sourceMap option), but it only maps their own output to their own input, so you would end up with at least 3 maps (if you manage to avoid naming conflicts):

    • one from minified css to concatenated css
    • one from concatenated css to separate css files
    • one from each css file to the original sass files

    I understand you're looking for 1 map from the minified css to the original sass files, correct? Unfortunately, afaik there is no support for that in the tools.