-
Notifications
You must be signed in to change notification settings - Fork 72
Fix emitcss #59
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
Fix emitcss #59
Conversation
@kaisermann Thank you! Webpack's bizarre distinction between loaders and plugins is unfortunate, because I think it's a little bit confusing to need both So I wondered if we could do it all in the loader, and #60 is what I came up with. It basically copies the relevant lines from webpack-virtual-modules but applies it to the compiler when the loader first runs, so a user of this loader doesn't need to make any further changes to their webpack config. Does that seem like a workable approach (albeit somewhat hacky — not that we can really avoid hacks here)? I'm still seeing that stack overflow with |
Oh, that was a good idea! I'll keep track of any updates and fixes on the You're getting the |
Yeah — whether I'm using |
That's probably because the However, even without the stack error, I think the hot module replacement is not working properly yet. Edit: Using the branch from #60, now it seems that Svelte is not compiling the example template correctly: |
Ah, nice — thanks. The Unfortunately there is a problem still — the stack overflow is gone, but it's not applying style changes correctly on hot reload. Will open a separate issue for that. Thanks so much for all your help! |
This PR makes the loader write CSS files directly to webpack's virtual filesystem (thanks to webpack-virtual-modules).
The usage is something like: