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
Load upstream source content from the filesystem #1346
Comments
Are you want to add real source code according to source map into There are a few questions, which we should answer first:
|
Yes. This is already the default behavior if
Right now:
That's definitely not useful or consistent behavior. I think the question of whether the user wants to see the original source code or the generated CSS and how to configure that is separate from this issue (although currently PostCSS defaults to showing the original source code which I think is most likely to be useful).
My particular use-case is integrating PostCSS into Google's build system, but I think having PostCSS correctly parse source maps by default is generally valuable.
The source map handling already bends this policy by loading a source map from a CSS file's I think PostCSS's system of having reasonable default behavior of loading stuff from the filesystem, but having that be overridable using the |
I think I will move this issue for 8.1+. A pull request is welcome to release it faster. |
Currently, PostCSS never tries to load a source file's contents. This means that error messages won't display the upstream file's contents unless they're included in
sourcesContents
, which for large compilations could be extremely large.To reproduce:
Compare to:
The text was updated successfully, but these errors were encountered: