Migrate to Sveltekit 2.0

This commit is contained in:
Max Nuding 2024-01-22 17:26:36 +01:00
parent f1cb0b2159
commit ad7c8af9de
No known key found for this signature in database
3 changed files with 7 additions and 6 deletions

View File

@ -14,8 +14,9 @@
"format": "prettier --plugin-search-dir . --write ." "format": "prettier --plugin-search-dir . --write ."
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-node": "^1.2.3", "@sveltejs/adapter-node": "^2.0.0",
"@sveltejs/kit": "^1.20.4", "@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/node": "^18.16.3", "@types/node": "^18.16.3",
"@types/sqlite3": "^3.1.8", "@types/sqlite3": "^3.1.8",
"@types/ws": "^8.5.4", "@types/ws": "^8.5.4",
@ -31,7 +32,7 @@
"svelte-check": "^3.4.3", "svelte-check": "^3.4.3",
"tslib": "^2.4.1", "tslib": "^2.4.1",
"typescript": "^5.0.0", "typescript": "^5.0.0",
"vite": "^4.0.0" "vite": "^5.0.0"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
@ -44,4 +45,4 @@
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=18.0.0"
} }
} }

View File

@ -53,7 +53,7 @@ export const handle = (async ({ event, resolve }) => {
return new Response(f, { headers: [['Content-Type', 'image/' + suffix]] }); return new Response(f, { headers: [['Content-Type', 'image/' + suffix]] });
} catch (e) { } catch (e) {
log.error('no stream', e); log.error('no stream', e);
throw error(404); error(404);
} }
} }

View File

@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-node'; import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/kit/vite'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */ /** @type {import('@sveltejs/kit').Config} */
const config = { const config = {