Migrating from v1

Edit this page

This is a migration guide of how to upgrade your v1 SolidStart app to our new v2 version.

Please note that some third-party packages may not be compatible with v2 yet.


Migration steps

1. Update your project to use the latest version of SolidStart

2. Rename app.config.ts to vite.config.ts

3. Updatevite.config.ts

v2 ships as a native vite plugin using the environment api instead of vinxi.

import { defineConfig } from "vite";
import { solidStart } from "@solidjs/start/config";
export default defineConfig({
plugins: [
solidStart(),
]
});

An important note is that defineConfig comes from vite directly.

Defining middleware

Middlware is defined using the middleware option on the solidStart vite plugin.

import { defineConfig } from "vite";
import { solidStart } from "@solidjs/start/config";
export default defineConfig({
plugins: [
solidStart({
middleware: "./src/middleware.ts"
}),
]
});

4. Remove the vinxi dependency and add the vite dependency

pnpm remove vinxi
"dependencies": {
"vite": "^7"
}

5. Updatepackage.json build/dev commands

Update the build/dev commands to use native vite instead of vinxi.

"scripts": {
"dev": "vite dev",
"build": "vite build"
}

6. Replace all leftover vinxi imports

  • useSession now comes from @solidjs/start/server instead of `vinxi/http

7. Add back nitro via the vite plugin

import { defineConfig } from "vite";
import { solidStart } from "@solidjs/start/config";
export default defineConfig({
plugins: [
solidStart(),
nitro({
preset: 'netlify'
})
]
});
Report an issue with this page