-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Skip Vite resolve workaround on Vite 4.1+ or Svelte 4+ #622
Conversation
This requires a changeset and is a breaking change as we would have to bump the peer dependency on vite. Another option would be to import and test the vite version so we only keep doing it for the early vite-4 versions. That would then be a patch |
Addendum: If you remove the svelte/ssr export that contains the onMount as noop, the feature would stop working altogether. |
I can't currently run I don't think it's a breaking change because nothing breaks if this is removed. The user just ends up with a slightly larger bundle, but that doesn't seem breaking to me. Removing |
slightly larger could be significantly larger and drive an edge deployment over a limit. I am not willing to take that risk. |
Do you know what version of Vite 4 this was fixed in or have a link to the issue this was working around? I wouldn't know where to start looking |
It's fixed in vitejs/vite#11595, which is released in Vite 4.1 |
I've updated this to only do the resolve workaround on Vite 4.0 |
Co-authored-by: Dominik G. <[email protected]>
Co-authored-by: Dominik G. <[email protected]>
Co-authored-by: Dominik G. <[email protected]>
725c502
to
8909c27
Compare
I updated this to check the Svelte version as well |
according to @dominikg:
I think we can safely remove this. People who are on old versions of Vite 4 may get larger apps if they upgrade
vite-plugin-svelte
without upgrading Vite, but that's relatively safe as nothing will break.There's some nice benefits to removing this including simplifying the
vite-plugin-svelte
code and eventually paving the way for us to stop exportingsvelte/ssr
in Svelte core