blendid icon indicating copy to clipboard operation
blendid copied to clipboard

[gulp] Production sourcemap for css

Open aegyed91 opened this issue 9 years ago • 1 comments

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.

aegyed91 avatar Dec 19 '15 22:12 aegyed91

@tsm91 Why do you want to include CSS sourcemaps in production?

alexcarpenter avatar May 18 '16 18:05 alexcarpenter