Skip to content

Commit ee4395c

Browse files
Sync kit docs (#1044)
sync kit docs Co-authored-by: Rich-Harris <[email protected]>
1 parent db463c2 commit ee4395c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

apps/svelte.dev/content/docs/kit/98-reference/50-configuration.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,29 @@ are three strategies with different trade-offs:
723723
- `preload-js` - uses `<link rel="preload">`. Prevents waterfalls in Chromium and Safari, but Chromium will parse each module twice (once as a script, once as a module). Causes modules to be requested twice in Firefox. This is a good setting if you want to maximise performance for users on iOS devices at the cost of a very slight degradation for Chromium users.
724724
- `preload-mjs` - uses `<link rel="preload">` but with the `.mjs` extension which prevents double-parsing in Chromium. Some static webservers will fail to serve .mjs files with a `Content-Type: application/javascript` header, which will cause your application to break. If that doesn't apply to you, this is the option that will deliver the best performance for the largest number of users, until `modulepreload` is more widely supported.
725725

726+
</div>
727+
</div>
728+
<div class="ts-block-property">
729+
730+
```ts
731+
// @noErrors
732+
bundleStrategy?: 'split' | 'single';
733+
```
734+
735+
<div class="ts-block-property-details">
736+
737+
<div class="ts-block-property-bullets">
738+
739+
- <span class="tag">default</span> `'split'`
740+
- <span class="tag since">available since</span> v2.13.0
741+
742+
</div>
743+
744+
If `'split'`, splits the app up into multiple .js/.css files so that they are loaded lazily as the user navigates around the app. This is the default, and is recommended for most scenarios.
745+
If `'single'`, creates just one .js bundle and one .css file containing code for the entire app.
746+
747+
When using `'split'`, you can also adjust the bundling behaviour by setting [`output.experimentalMinChunkSize`](https://rollupjs.org/configuration-options/#output-experimentalminchunksize) and [`output.manualChunks`](https://rollupjs.org/configuration-options/#output-manualchunks)inside your Vite config's [`build.rollupOptions`](https://vite.dev/config/build-options.html#build-rollupoptions).
748+
726749
</div>
727750
</div>
728751

0 commit comments

Comments
 (0)