From b679103a4ce1ee87394c318f41b4cd12d2d41709 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Thu, 24 Feb 2022 18:47:36 +0100 Subject: update sveltekit version --- web/pw-server/package.json | 2 +- web/pw-server/src/hooks.js | 8 ++++++++ web/pw-server/svelte.config.js | 5 ++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 web/pw-server/src/hooks.js (limited to 'web/pw-server') diff --git a/web/pw-server/package.json b/web/pw-server/package.json index d29479c..c8be055 100644 --- a/web/pw-server/package.json +++ b/web/pw-server/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@originjs/vite-plugin-commonjs": "^1.0.1", "@sveltejs/adapter-auto": "next", - "@sveltejs/kit": "next", + "@sveltejs/kit": "^1.0.0-next.286", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.30", "@typescript-eslint/eslint-plugin": "^4.31.1", "@typescript-eslint/parser": "^4.31.1", diff --git a/web/pw-server/src/hooks.js b/web/pw-server/src/hooks.js new file mode 100644 index 0000000..c5785ed --- /dev/null +++ b/web/pw-server/src/hooks.js @@ -0,0 +1,8 @@ +/** @type {import('@sveltejs/kit').Handle} */ +export async function handle({ event, resolve }) { + const response = await resolve(event, { + ssr: false, + }); + + return response; +} \ No newline at end of file diff --git a/web/pw-server/svelte.config.js b/web/pw-server/svelte.config.js index f2587f7..4eddd58 100644 --- a/web/pw-server/svelte.config.js +++ b/web/pw-server/svelte.config.js @@ -14,8 +14,7 @@ const config = { adapter: adapter(), // hydrate the
element in src/app.html - target: "#svelte", - ssr: false, + // target: "#svelte", vite: { plugins: [ isoImport(), @@ -31,7 +30,7 @@ const config = { }, server: { proxy: { - "/api/": "http://localhost:9000", + "/api/": "http://127.0.0.1:9000", "/ws": "ws://localhost:9000/ws", }, fs: { -- cgit v1.2.3