-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
wip: add vite5 support #10818
wip: add vite5 support #10818
Conversation
|
I merged in the latest
|
beta.11 has rollup4 so we have to use it here aswell. took the opportunity to bump a few others alongside. |
@@ -30,6 +29,16 @@ for (const pkg_path of glob(resolve_path('../../../packages/*/package.json'))) { | |||
overrides[name] = `${protocol}${path.dirname(path.resolve(pkg_path))}`; | |||
} | |||
|
|||
for (const [name, version] of Object.entries(overrides)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create-svelte tests generate a temp workspace and that needs to handle overrides. In this PR I introduced workspace level overrides for some packages
"esbuild": "$esbuild",
"svelte": "$svelte",
"vite": "$vite",
"typescript": "$typescript",
"rollup": "$rollup"
the updated script ensures that the temp workspace uses the correct values from workspace devDependencies.
There's some issue with Vite 5 that I think remains even with this PR: #11085. I looked into it for a bit this morning, but am out of time at the moment to keep investigating |
Closing in favor of #11122, which is up-to-date and has a closer approach to what we've decided to go with |
right now this PR is a breaking change as users have to install v-p-s manually after upating.
To avoid the breaking change, we would need to somehow keep the dependency on v-p-s@2 and add a new one to v-p-s@3, maybe using an alias like
"@sveltejs/vps3":"npm:@sveltejs/vite-plugin-svelte@^3"
and then dynamically picking the one to use after a vite version check.Downside is that with v-p-s 2 still in the dependencies, users updating to vite-5/v-p-s3 would see peer dependency warnings about it.
The other alternative is trying to use a combined range in dependencies
"@sveltejs/vite-plugin-svelte":"^2.4.1|| ^3.0.0-next.0"
but then it becomes a bit difficult to manage our own workspace as running sth likepnpm update @sveltejs/vite-plugin-svelte
could bork that.Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.