Comments (8)
No, it should work the same. Looks like a bug, I'll try to see if I can reproduce. Any chance you can share your webpack config?
Have you tried with svelte-loader-hot
, but the hot
option set to false? Same result?
from svelte-loader-hot.
Here is the commit that I use to test svelte-loader-hot : wighawag/eip-2585@22f6281
for hot option you means the hotReload
option ?
If so it still has the same issue
from svelte-loader-hot.
Hmm, I tried to add svelte-preprocess
to my sapper template example and it seems to work.
In your project, you're missing the preprocess
option in the client part of the config (here). It's probably needed there too.
If this doesn't help, can you share the error you're getting?
from svelte-loader-hot.
And yes, I meant the hotReload
option sorry. Got confused with the Rollup plugin...
from svelte-loader-hot.
Yes, you right, it works : wighawag/eip-2585@1d95abd
Thanks!
I guess the client preprocess option was not needed in non-hot-reload mode because the css get generated once by the server and it never need to be generated again client side.
But with hot-reload it now need to be handled by client side for hot reload to work
The only issue I have now is that when I remove some css class definition, the css does not get updated, but if I change the value in the class definition, it get applied.
Not sure if this is solvable ?
from svelte-loader-hot.
I'm somewhat surprised that it works without the preprocess in the client, even with the official plugin. I don't know enough about tailwind and postcss to speculate as to why... But glad to hear you could make it work!
And yes, CSS is still badly supported. Simply put, Svelte adds some stylesheets to the document, and they are never removed. So when you change something, the change is visible (same CSS specificity, last appended stylesheet wins). But when you remove a CSS rule, it stays there forever...
Said like that it makes me realize that it is probably a sizable memory leak too (until you reload the page).
I have added a fix for this. Can you try with svelte-loader-hot@next
(you should get 0.3.1-0), and see if it works better for you?
from svelte-loader-hot.
Yes seems like it works better. Could not test all the thing but I saw css update going through even when pre processed
from svelte-loader-hot.
I think we're done here. Feel free to reopen if needed.
from svelte-loader-hot.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-loader-hot.