admin管理员组

文章数量:1431994

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

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

Share Improve this question asked Feb 13, 2023 at 2:50 plutowniumplutownium 2,0783 gold badges19 silver badges42 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

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 acmodate my files now being in /src/routes instead of /src/App.svelte

本文标签: javascriptHow to migrate from plain Svelte to add SvelteKit featuresStack Overflow