Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options: {map: false} delete previous sourcemap comment from css #486

Closed
ihorzenich opened this issue Aug 13, 2015 · 4 comments
Closed

options: {map: false} delete previous sourcemap comment from css #486

ihorzenich opened this issue Aug 13, 2015 · 4 comments

Comments

@ihorzenich
Copy link

If I set

    options: {
      map: false,

PostCSS should won't create or update sourcemaps!
But it delete previous sourcemap comment from result css: /*# sourceMappingURL=main.css.map */ so css-file no longer have sourcemap.

My config for PostCSS is default (from https://github.com/nDmitry/grunt-postcss).

Why I set map: false? I was try to make workaroud because PostCSS broked my sourcemap if I add Google MDL.css

@ai
Copy link
Member

ai commented Aug 13, 2015

I will look when finish current refactoring

@ai
Copy link
Member

ai commented Aug 13, 2015

@delka Hm. What is a reason to save old source map if you change CSS. Source map is very content based, if you change one line or letter in CSS, you can broke entire source map.

@ihorzenich
Copy link
Author

@ai the reason is what PostCSS broke source map if I add material.min.css from Google MDL (http://www.getmdl.io/started/index.html). Bug looks like nDmitry/grunt-autoprefixer#88
I read about promblem with @charset "utf-8" and delete it almost, but bug still present.

@ai
Copy link
Member

ai commented Aug 14, 2015

Source map is a big file with origin line, column → generated line, column mappings. So if you disable source map in PostCSS, Autoprefixer will add new lines and it will broke previous mappings. So there is no sense to keep old source map because it became outdated after any sources changes.

@ai ai closed this as completed Aug 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants