diff --git a/packages/nitro/src/rollup.config.ts b/packages/nitro/src/rollup.config.ts index 334f52df4e..450fbaffe0 100644 --- a/packages/nitro/src/rollup.config.ts +++ b/packages/nitro/src/rollup.config.ts @@ -82,6 +82,11 @@ export const getRollupConfig = (config) => { options.plugins.push(resolve({ extensions, preferBuiltins: true, + rootDir: config.rootDir, + // https://www.npmjs.com/package/resolve + customResolveOptions: { + basedir: config.rootDir + }, mainFields: ['main'] // Force resolve CJS (@vue/runtime-core ssrUtils) }))