-
Notifications
You must be signed in to change notification settings - Fork 9
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
Issue with Parcel bundler #6
Comments
Hi, I'm not user of Parcel so I would miss few things but, did you tried a plugin for svelte? https://github.com/DeMoorJasper/parcel-plugin-svelte The error |
That's the plugin I am using. I think the problem is that it uses the minified version of yrv when bundling (as pointed by So, I am not really sure who is right here - svelte plugin or yrv 🤔 |
Let's try something, just remove the |
Didn't help. This is a Parcel error as you said because it works fine with Rollup. I will reach out to its author instead. Thanks for the help, for the nice router and keep up the good work! 💪 |
Hey, I am re-opening the issue as something was fixed in 0.0.19 but breaks again in 0.0.25. Maybe you can help me figure out what's causing it. Now I get an new error instead:
My guess is that it has something to do with how Rollup packs and minifies yrv and Parcel is using browser prop if |
Did you tried this settings? https://github.com/sveltejs/svelte-loader I mean, I understand the Update: I'm not webpack user but since there's enough docs and loaders I believe it should work if configured properly, if Parcel does not let you to do the same then the problem is not you... |
After a quick investigation it seems to be more a Parcel/Babel/Svelte thing as I read in comments: DeMoorJasper/parcel-plugin-svelte#44 I'm trying to make it work on Parcel with no luck yet, same issues as above. Regarding webpack I just tried this template and it just worked! |
This is an interesting thread parcel-bundler/parcel#1655 I tried putting I am curious about your decision behind minifying and transpiling the yrv distribution, because most of the people use some kind of "modern" bundler already while developing their app and in the end it is the one that should take care of all that stuff. In the end, it might be best to settle for some kind of minimal working default distribution that would satisfy most modern bundlers (Parcel included). 😉 Also, Parcel Svelte plugin is using
|
So there's no way to tell parcel that If that's true I'll remove such entry on the |
I tried many things and I finally nailed it down to this line in Rollup config: https://github.com/pateketrueke/yrv/blob/master/rollup.config.js#L29 When removing it and then re-building everything works. Don't ask me why 😅 However, the final yrv bundle size becomes much larger as it also bundles Svelte in this case seems like, but it also looks like the total size of the bundled app when built increased only by 3KB. |
That seems more accurate, and also I'm publishing a new release with all these changes, so much thanks for your input! |
Hi!
I am trying to use this with Parcel. However, when starting a dev server Parcel grabs a minified version of the plugin as defined in
pkg.browser
. For some reason things break in the browser.Uncaught TypeError: store.subscribe is not a function
When changing the
pkg.browser
entry tosrc/index.js
everything works as expected. Thepkg.svelte
already points to it, but this is a reserved property for the svelte compiler options and should not be used as an entry point, right?I am a little unsure on how to proceed here. On what side the error is. Isn't it a bundler's job to minify the assets? What's your opinion?
The text was updated successfully, but these errors were encountered: