You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything was working fine until I upgraded parcel-plugin-svelte to version 4.0.8. Now, the the css option never gets set to true anywhere. This means that my ability to run a hot reload server over a websocket with something like parcel app.js works for JavaScript, but the CSS is totally broken.
I'm not sure what the best solution is given that others were having a problem before (but also why didn't they just set "css": false in their own config, rather than opening a pull request to force it that one way for everyone all the time here?), but hardcoding a config option seems like a bad idea to me in general. In this case it has broken parcel development for me and my team.
I believe the only reason you haven't been swamped with bug reports yet is that the published version is still 4.0.6, which does not contain this bug. I strongly suggest reversing the responsible commit. As soon as 4.0.8 gets published it's going to cause a lot more problems than it solves. And then anyone with similar issues to #138 can always set their own config option themselves, which was working perfectly fine before this anyway.
I did some more research, and it's worth noting that the other project that got the same report and pull request - https://github.com/orlov-vo/parcel-transformer-svelte - did not end up merging the commit that hard codes css: false. I'd say that's further evidence it's not a good idea.
🐛 Bug Report
🎛 Configuration (.svelterc, package.json, cli command)
I have different config options for active development vs bundling for production in a
svelte.config.js
file that looks like this:Everything was working fine until I upgraded parcel-plugin-svelte to version 4.0.8. Now, the the
css
option never gets set totrue
anywhere. This means that my ability to run a hot reload server over a websocket with something likeparcel app.js
works for JavaScript, but the CSS is totally broken.💻 Code Sample
The cause appears to be this commit: e14cf22
Because
css
is hardcoded tofalse
there and a few lines below that the parcel config OVERRIDES any custom config, it means my config is effectively ignored and there is no way for someone using this plugin to set"css": true
: https://github.com/DeMoorJasper/parcel-plugin-svelte/blob/master/packages/parcel-plugin-svelte/lib/svelte-asset.js#L27I'm not sure what the best solution is given that others were having a problem before (but also why didn't they just set
"css": false
in their own config, rather than opening a pull request to force it that one way for everyone all the time here?), but hardcoding a config option seems like a bad idea to me in general. In this case it has broken parcel development for me and my team.I believe the only reason you haven't been swamped with bug reports yet is that the published version is still 4.0.6, which does not contain this bug. I strongly suggest reversing the responsible commit. As soon as 4.0.8 gets published it's going to cause a lot more problems than it solves. And then anyone with similar issues to #138 can always set their own config option themselves, which was working perfectly fine before this anyway.
🌍 Your Environment
"parcel-plugin-svelte": "4.0.8",
"svelte": "3.31.2"
The text was updated successfully, but these errors were encountered: