Skip to content

Commit a95d5b8

Browse files
authored
chore: always use manualChunks for bundling single and inline apps (#13915)
1 parent 93bc6f0 commit a95d5b8

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

.changeset/tough-beers-drum.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
chore: use `manualChunks` to bundle single and inline apps with Rolldown

packages/kit/src/exports/vite/index.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,7 @@ Tips:
695695
assetFileNames: `${prefix}/assets/[name].[hash][extname]`,
696696
hoistTransitiveImports: false,
697697
sourcemapIgnoreList,
698+
manualChunks: split ? undefined : () => 'bundle',
698699
inlineDynamicImports: false
699700
},
700701
preserveEntrySignatures: 'strict',
@@ -734,19 +735,6 @@ Tips:
734735
// enableNativePlugin: true
735736
// }
736737
};
737-
738-
if (!split && new_config.build?.rollupOptions?.output) {
739-
const output_options = /** @type {import('vite').Rollup.OutputOptions} */ (
740-
new_config.build.rollupOptions.output
741-
);
742-
// @ts-expect-error `vite.rolldownVersion` only exists in `rolldown-vite`
743-
if (vite.rolldownVersion) {
744-
output_options.inlineDynamicImports = true;
745-
} else {
746-
/** @type {import('rollup').OutputOptions} */ (output_options).manualChunks = () =>
747-
'bundle';
748-
}
749-
}
750738
} else {
751739
new_config = {
752740
appType: 'custom',

0 commit comments

Comments
 (0)