File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import { distDir } from './dirs'
1616import { isDirectory , readDirRecursively } from './vite/utils/fs'
1717
1818export async function setupNitroBridge ( ) {
19- const nuxt = useNuxt ( )
19+ const nuxt = useNuxt ( ) as Nuxt & { _nitro ?: Nitro }
2020
2121 // Ensure we're not just building with 'static' target
2222 if ( ! nuxt . options . dev && nuxt . options . target === 'static' && ! nuxt . options . _prepare && ! nuxt . options . _generate && ! ( nuxt . options as any ) . _export && ! nuxt . options . _legacyGenerate ) {
@@ -154,7 +154,8 @@ export async function setupNitroBridge () {
154154 // Initiate nitro
155155 const nitro = await createNitro ( nitroConfig )
156156
157- // Expose nitro to modules
157+ // Expose nitro to modules and kit
158+ nuxt . _nitro = nitro
158159 await nuxt . callHook ( 'nitro:init' , nitro )
159160
160161 // Shared vfs storage
You can’t perform that action at this time.
0 commit comments