Does grunt-contrib-less support --source-map-map-i

2019-03-04 13:06发布

问题:

Title says it all. Is this Less option:

http://lesscss.org/usage/#command-line-usage-source-map-map-inline

Available via grunt-contrib-less, or some other plugin? I'm not hopeful since it does not seem be mentioned anywhere in the grunt-contrib-less docs.

To be clear, I don't want grunt to output a separate map file, I'd like the mapping information to appear inline, in the primary output CSS file.

回答1:

It sure does, here's a stripped down config of what I use:

    less: {
        options: {
            sourceMap:true,
            outputSourceFiles: true
        },
        lessFiles: {
            src: [
                '*.less'
            ],
            ext: '.css',
            cleancss:true
        }
    },