-
-
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
Shared config object is mutated #5308
Labels
bug
Something isn't working
Comments
This was referenced Jul 2, 2022
Rich-Harris
added a commit
that referenced
this issue
Jul 5, 2022
…e `vite.config.js` (#5332) * [breaking] graduate @sveltejs/kit/vite from experimental * update site and tests to use vite.config.js * Add vite.config.js to the create-svelte templates * [breaking] require vite.config.js * turbo can go to hell * wtf pnpm * revert b6b9208 * fix some turbo config * lint * check * Update packages/kit/src/cli.js Co-authored-by: Rich Harris <[email protected]> * [breaking] switch to vite CLI for dev, build, and preview commands * Clarify message * more updates to test projects * remove svelte-kit dev/build/preview commands * a few more fixes * lint * fix adapter-static tests * docs * update lockfile, not sure how it got borked * lockfile * doc typos * bump undici * bump @rollup/plugin-commonjs * fix config validation * fix #5308 * adapter-static tests * update svelte-kit sync docs * update svelte-kit package docs * Revert "adapter-static tests" This reverts commit aa76235. * fix workspace/prepare scripts * Revert "fix workspace/prepare scripts" This reverts commit 9ece16a. * Revert "Revert "adapter-static tests"" This reverts commit 72432bb. * try something else * remove debug line * try using edge functions * Revert "try using edge functions" This reverts commit 5b2eebd. * remove unused file * update gitignore so we can run vc build locally to diagnose hanging * tweak CLI docs * trying this once more * doh * use workspace dependencies * ugh lockfile * use src code locally, dist in CI Co-authored-by: Rich Harris <[email protected]> Co-authored-by: Rich Harris <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
SvelteKit's
vite/index.js
stores the config invite_user_config
and passes it into multiple builds. Vite mutates the config causing unexpected values for latter builds. This doesn't seem to be an issue for most users, but does cause issues withvite-plugin-pwa
Reproduction
Update
svelte.config.js
for the site to the one below. Note that you need to comment out SvelteKit'sprocess.exit
for the Vite plugin to be invokedSuggested Solution
The config above isn't one that can be cloned. Instead we need to do something like leave
vite-plugin-svelte-kit
in place, but makewriteBundle
a no-op unless it's the client build (or equivalently split the config stuff out into a separate plugin that's used for the server build as well)System Info
`master`
Severity
Prevents https://github.com/userquin/pwa-sveltekit-vite from working
Additional Information
No response
The text was updated successfully, but these errors were encountered: