diff --git a/packages/nitro/src/rollup/config.ts b/packages/nitro/src/rollup/config.ts index b293d3b59f..3daeb0c95f 100644 --- a/packages/nitro/src/rollup/config.ts +++ b/packages/nitro/src/rollup/config.ts @@ -195,6 +195,7 @@ export const getRollupConfig = (nitroContext: NitroContext) => { nitroContext._internal.runtimeDir, ...(nitroContext._nuxt.dev ? [] : [nitroContext._nuxt.buildDir]), ...nitroContext.middleware.map(m => m.handle), + nitroContext._nuxt.rootDir, nitroContext._nuxt.serverDir ], traceOptions: { diff --git a/packages/nitro/src/rollup/plugins/automock.ts b/packages/nitro/src/rollup/plugins/automock.ts index 7393c5820d..f5aad11b10 100644 --- a/packages/nitro/src/rollup/plugins/automock.ts +++ b/packages/nitro/src/rollup/plugins/automock.ts @@ -1,8 +1,11 @@ +import consola from 'consola' + export function autoMock () { return { name: 'auto-mock', resolveId (src: string) { if (src && !src.startsWith('.') && !src.includes('?') && !src.includes('.js')) { + consola.warn('Auto mock external ', src) return { id: require.resolve('@nuxt/un/runtime/mock/proxy') }