Skip to content

[breaking] graduate @sveltejs/kit/vite from experimental and require vite.config.js#5332

Merged
Rich-Harris merged 52 commits intomasterfrom
vite-final
Jul 5, 2022
Merged

[breaking] graduate @sveltejs/kit/vite from experimental and require vite.config.js#5332
Rich-Harris merged 52 commits intomasterfrom
vite-final

Conversation

@benmccann
Copy link
Member

@benmccann benmccann commented Jun 30, 2022

Closes #5184
Closes #5308
Closes #5335
Closes #5312

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2022

🦋 Changeset detected

Latest commit: 12a03e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sveltejs/kit Patch
create-svelte Patch

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

@benmccann benmccann changed the title [breaking] graduate @sveltejs/kit/vite from experimental [breaking] graduate @sveltejs/kit/vite from experimental and require vite.config.js Jul 1, 2022
@Rich-Harris
Copy link
Member

I can reproduce the hanging build locally with vc build (in the project root — I had to temporarily delete the other vercel project linked to the repo, though apparently it's possible to change the linked project with vc link). Haven't managed to diagnose yet

@Rich-Harris
Copy link
Member

Alright, the problem was turbo — there's something about this branch it doesn't like. I don't intend to spend any time figuring out why it hangs on this branch but not on master, so I've just updated the build command on Vercel:

-cd ../../ && npx turbo run build --force --filter=kit --filter=kit.svelte.dev && cd sites/kit.svelte.dev
+cd ../../packages/kit && pnpm build && cd ../../sites/kit.svelte.dev && pnpm build

@jeffkelleran
Copy link

jeffkelleran commented Jul 14, 2022

Leaving a comment for others that are upgrading older projects (mine was a couple of months old). I followed the prescribed steps: 1) Install vite as a dev dependency, 2) Update my scripts, and 3) Create vite.config.js. My svelte.config.js file contained config information for vite (config.kit.vite). That entry kept the dev server from starting. Running the 'dev' script will give you an error: "config.kit.vite has been removed - use vite.config.js instead". I removed that entry and the dev server started up fine. Hope that helps somebody!

const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess(),

	kit: {
		adapter: adapter(),
		vite: {/*This config info needs to be removed for the dev server to start */}
	}
};

@dolie
Copy link

dolie commented Jul 19, 2022

Thank you @jeffkelleran !!!
I copy/paste vite property content into vite.config.js and it works fine !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants