-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[chore] upgrade to vite-plugin-svelte
1.1.0 and enable prebundleSvelteLibraries
#7388
Conversation
🦋 Changeset detectedLatest commit: d3e576a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Enabling
|
@schmidtk can you file an issue with a way to reproduce this? I haven't see this error before and am unsure what to advise without some way to be able to reproduce and debug it |
@benmccann No problem, I was hoping it would ring a bell. 😄 I'll see if I can reproduce with a simple example, because I'm currently working in a reasonably large monorepo. |
@benmccann Ok narrowed it down further. The error is a combination of enabling I'll check with my team on why we're using that flag and see if we can stop doing that, but adding our own Let me know if those two flags should be working together and I can file an issue. Update: It looks like that flag was a temporary workaround to a vite bug and can be removed. |
Enabling Since all load functions run simultaneously and there is no easy way to init both client and server side, it's very useful to allow imported libraries to be configured via environment variables. Is there a way to still use environment variables in imported libraries? |
@jacob-8 One workaround we discussed is to set |
Perfect! I'll try that.
Yeah, I used to pass in a config to the library and would like to return to doing this but with all the changes affecting initialization of a library on both client and server side it was just to painful to make one single solution work across all my projects without awaiting parent in each load. I'm waiting until the dust settles a bit more. |
In our app we use byteMD, and it stopped working with 526, but only in dev mode ( The error message in console is like As this message hints to vite dev mode module loading, and this PR was linked from 526 changelog, I post here. |
I hadn't much luck fiddling with config files, so I setup a blank sveltekit project to reproduce:
testing dichotomy:
@benmccann I can push the reproduction repository if needed (with a branch which works and a branch which doesn't). |
@benmccann reproductible repository here: https://github.com/0gust1/sveltekit-bug-repro-526 |
We'll turn
prebundleSvelteLibraries
on by default invite-plugin-svelte
2.0 when Vite 4 comes out. For now we turn it on here. The feedback thus far has been goodRef #2612