Skip to content

Commit

Permalink
chore: add note about script: true
Browse files Browse the repository at this point in the history
  • Loading branch information
invakid404 committed Oct 1, 2024
1 parent deadb34 commit dead85a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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',
Expand Down

0 comments on commit dead85a

Please sign in to comment.