@@ -184,6 +184,9 @@ async function kit({ svelte_config }) {
184
184
/** @type {import('vite') } */
185
185
const vite = await import_peer ( 'vite' ) ;
186
186
187
+ // @ts -ignore `vite.rolldownVersion` only exists in `rolldown-vite`
188
+ const isRolldown = ! ! vite . rolldownVersion ;
189
+
187
190
const { kit } = svelte_config ;
188
191
const out = `${ kit . outDir } /output` ;
189
192
@@ -661,8 +664,7 @@ Tips:
661
664
copyPublicDir : ! ssr ,
662
665
cssCodeSplit : svelte_config . kit . output . bundleStrategy !== 'inline' ,
663
666
cssMinify : initial_config . build ?. minify == null ? true : ! ! initial_config . build . minify ,
664
- // don't use the default name to avoid collisions with 'static/manifest.json'
665
- manifest : '.vite/manifest.json' , // TODO: remove this after bumping peer dep to vite 5
667
+ manifest : true ,
666
668
outDir : `${ out } /${ ssr ? 'server' : 'client' } ` ,
667
669
rollupOptions : {
668
670
input : inline ? input [ 'bundle' ] : input ,
@@ -674,14 +676,12 @@ Tips:
674
676
assetFileNames : `${ prefix } /assets/[name].[hash][extname]` ,
675
677
hoistTransitiveImports : false ,
676
678
sourcemapIgnoreList,
677
- manualChunks : split ? undefined : ( ) => 'bundle' ,
678
- inlineDynamicImports : false
679
+ inlineDynamicImports : ! split
679
680
} ,
680
681
preserveEntrySignatures : 'strict' ,
681
682
onwarn ( warning , handler ) {
682
683
if (
683
- // @ts -ignore `vite.rolldownVersion` only exists in `rolldown-vite`
684
- ( vite . rolldownVersion
684
+ ( isRolldown
685
685
? warning . code === 'IMPORT_IS_UNDEFINED'
686
686
: warning . code === 'MISSING_EXPORT' ) &&
687
687
warning . id === `${ kit . outDir } /generated/client-optimized/app.js`
@@ -797,7 +797,7 @@ Tips:
797
797
const log = logger ( { verbose } ) ;
798
798
799
799
/** @type {import('vite').Manifest } */
800
- const server_manifest = JSON . parse ( read ( `${ out } /server/${ vite_config . build . manifest } ` ) ) ;
800
+ const server_manifest = JSON . parse ( read ( `${ out } /server/.vite/ manifest.json ` ) ) ;
801
801
802
802
/** @type {import('types').BuildData } */
803
803
const build_data = {
@@ -870,7 +870,7 @@ Tips:
870
870
) ;
871
871
872
872
/** @type {import('vite').Manifest } */
873
- const client_manifest = JSON . parse ( read ( `${ out } /client/${ vite_config . build . manifest } ` ) ) ;
873
+ const client_manifest = JSON . parse ( read ( `${ out } /client/.vite/ manifest.json ` ) ) ;
874
874
875
875
/**
876
876
* @param {string } entry
0 commit comments