blendid
blendid copied to clipboard
[gulp] Production sourcemap for css
Hey again @greypants sorry for pinging you again. :D
With production build there is no css source map. I think it has something to do with the minification process that removes the comments. But something does definitely removes /*# sourceMappingURL=main.css.map */ from the end of the css file. Even if i generate the sourcemaps inline the same thing happens.
There is one slight modification i made, but this isn't the reason why it doesn't work.
.pipe(sourcemaps.write('.'))
With this you can write the sourcemap in a separate file next to css. It only gets loaded if your developer tools is open in the browser.
Also for this to work you need to serve the .map file with a proper mime type (application/json) with nginx.
@tsm91 Why do you want to include CSS sourcemaps in production?