File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
packages/nuxt/src/app/components Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ import { useRoute, useRouter } from '../composables/router'
24
24
import { PageRouteSymbol } from ' ../components/injections'
25
25
import AppComponent from ' #build/app-component.mjs'
26
26
import ErrorComponent from ' #build/error-component.mjs'
27
+ // @ts-expect-error virtual file
28
+ import { componentIslands } from ' #build/nuxt.config.mjs'
27
29
28
- const IslandRenderer = import .meta.server
30
+ const IslandRenderer = import .meta.server && componentIslands
29
31
? defineAsyncComponent (() => import (' ./island-renderer' ).then (r => r .default || r))
30
32
: () => null
31
33
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
32
32
const serverDir = join ( rootDir , '.output/server' )
33
33
34
34
const serverStats = await analyzeSizes ( [ '**/*.mjs' , '!node_modules' ] , serverDir )
35
- expect . soft ( roundToKilobytes ( serverStats . totalBytes ) ) . toMatchInlineSnapshot ( '"205k "' )
35
+ expect . soft ( roundToKilobytes ( serverStats . totalBytes ) ) . toMatchInlineSnapshot ( '"204k "' )
36
36
37
37
const modules = await analyzeSizes ( 'node_modules/**/*' , serverDir )
38
38
expect . soft ( roundToKilobytes ( modules . totalBytes ) ) . toMatchInlineSnapshot ( '"1335k"' )
@@ -72,7 +72,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
72
72
const serverDir = join ( rootDir , '.output-inline/server' )
73
73
74
74
const serverStats = await analyzeSizes ( [ '**/*.mjs' , '!node_modules' ] , serverDir )
75
- expect . soft ( roundToKilobytes ( serverStats . totalBytes ) ) . toMatchInlineSnapshot ( '"524k "' )
75
+ expect . soft ( roundToKilobytes ( serverStats . totalBytes ) ) . toMatchInlineSnapshot ( '"523k "' )
76
76
77
77
const modules = await analyzeSizes ( 'node_modules/**/*' , serverDir )
78
78
expect . soft ( roundToKilobytes ( modules . totalBytes ) ) . toMatchInlineSnapshot ( '"78.0k"' )
You can’t perform that action at this time.
0 commit comments