-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Incorrect source maps with sass output style set to compressed #783
Comments
It is PostCSS issue, not Autoprefixer. I think it was already reported postcss/postcss#926 |
@ai thanks for the fast response! Do you know when the issue will be fixed? I doubt I have the skills to fix it myself, but I can try if you point me in the right direction. |
Honestly, not soon. I now spend all my free time on Logux, because I will have a talk on React London. This error is not so critical and need a lot of time to fix it. |
Ah bummer. Good for you though! There's no hack to get this working or a way to use autoprefixer without postcss is there? |
@JoshMoreno Autoprefixer is a PostCSS plugin. Technically, without PostCSS nobody will update previous source map. Main problem that updating previous source map is a very complicated work and most of tools (like Sass) just don’t have this feature. The best solution — use pure-PostCSS stack. PostCSS for linting (Stylelint is thet best CSS ever) preprocessor (PreCSS or cssnext), prefixers, assets (postcss-assets, postcss-inline-svg), minification (cssnano). It will be the fastest (only one parsing for all tools) way without compatibility problems. |
When I compile sass using
outputStyle: 'compressed'
in conjunction with autoprefixer, the source map becomes inaccurate.If I set the
outputStyle
to any of the other 3 options, the source map is fine.If I leave it set to
compressed
and remove autoprefixer from the task, the source map is fine.Bug Demo
Download - autoprefixer-bug.zip
Run
npm install
Then
gulp not-working
Open
index.html
and inspect#footer
It should be pointing to the
_header.scss
file... which is wrong.Now run
gulp working
Refresh page and inspect
#footer
It should be pointing to
_footer.scss
which is correctSource Code
package.json
gulpfile.js
main.scss
_header.scss
_footer.scss
If you need more info just let me know. Thanks!
The text was updated successfully, but these errors were encountered: