simple-gulp-template icon indicating copy to clipboard operation
simple-gulp-template copied to clipboard

uncss spoiling sourcemaps in gulpfile.js

Open joseph-d opened this issue 10 years ago • 0 comments

I have found this template to be very useful when it comes to understanding how gulp works. However, I have come across a problem with this block of code in the gulpfile.js:

    .pipe(uncss({
        html: glob.sync(config.paths.html.src),
    }))

uncss is working correctly with this code, removing all of the unnecessary CSS selectors and making for a very lean and slim output. However, the downside is that it appears to be messing up the sourcemaps as all of the code is reported as being on line 1.

If I comment out the 3 lines of code above, the sourcemaps work properly but the output of the CSS is obviously quiet bloated.

I tried moving the 3 lines of code to run before the LESS was compiled but I soon realized my mistake because uncss can't read less :-)

Any ideas?

joseph-d avatar Aug 26 '15 09:08 joseph-d