-
Notifications
You must be signed in to change notification settings - Fork 151
External scss styles do not work with manually enqueued standalone processors #183
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
Comments
Hey @grundmanise 👋 Been trying to find out what's happening here for 2 hours and finally found something. There are mainly two issues here:
The first obvious (and possibly naive) solution that came to my mind is allowing preprocessors to modify the edit: My bad, the compiler does indeed pass the preprocessed content to subsequent preprocessors. Just got confused by a little variable shadowing. The second fix that comes to mind is to make each preprocessor aware of what kind of files they can import via the |
Hey @kaisermann 👋 Thank you for the investigation 👍 I didn't get a chance to go through the code, but can't we just state that if preprocessed content is being passed to the compiler it should not read |
@grundmanise Yeah! That's similar to what @halfnelson suggested in the discord server. If the content being passed is non-empty, the processors will just ignore the |
There ya go, fixed in |
Describe the bug
External
scss
styles do not work with manually enqueued standalone processors:Logs
To Reproduce
Repo: https://codesandbox.io/s/svelte-preprocess-bug-example-jrml4?file=/src/components/Nav.svelte
Run
yarn dev
. If you would inlineNav.scss
contents it would work as expected.Expected behavior
External
scss
stylesheet would be parsed correctly.Information about your project:
svelte-preprocess
:3.9.7
Webpack
The text was updated successfully, but these errors were encountered: