Reputation: 2018
I created a svelte app using Vite from the Svelte template. I have a tiny package.json and I want to start using Sveltekit. Here is the package.json
{
"name": "jxb2",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.0.2",
"svelte": "^3.55.1",
"vite": "^4.1.0"
},
"dependencies": {
"axios": "^1.3.2"
}
}
However, the docs dont say anything about making this ugprade. Sveltekit talks about how to create a project but says nothing about upgrading from svelte. I want to use the routing feature.
I can find a page about migrating from sapper but i dont want to do that, I want to get there from Svelte
Upvotes: 11
Views: 2301
Reputation: 2018
What I ended up doing was just copy-pasting my whole project over from the svelte proj into the sveltekit proj
Took about three minutes because it's still a small job. Mostly changed ./path
to ../path
to accommodate my files now being in /src/routes
instead of /src/App.svelte
Upvotes: 6