From dead85a5972e518ce481fbf75135031bfbaef657 Mon Sep 17 00:00:00 2001 From: invakid404 Date: Tue, 1 Oct 2024 23:00:50 +0300 Subject: [PATCH] chore: add note about `script: true` --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 27cd35b..6d3133a 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ export const csr = false; ``` Second, you must add the Vite plugin to your Vite config and the Svelte preprocessor to your Svelte -config: +config. Additionally, you must pass `{ script: true }` to `vitePreprocess`: ```ts // vite.config.(js|ts) @@ -51,12 +51,12 @@ export default defineConfig({ ```js // svelte.config.js import adapter from '@sveltejs/adapter-static'; -import { vitePreprocess } from '@sveltejs/kit/vite'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { islandsPreprocessor } from 'sveltekit-islands/preprocessor'; /** @type {import('@sveltejs/kit').Config} */ const config = { - preprocess: [vitePreprocess(), islandsPreprocessor()], + preprocess: [vitePreprocess({ script: true }), islandsPreprocessor()], kit: { adapter: adapter({ pages: 'build',