fix(nuxt): exempt nitro from import protections (#31246)

This commit is contained in:
Daniel Roe 2025-03-06 22:42:42 +00:00
parent 4f067f6013
commit d5588dbb8c
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -424,7 +424,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
ImpoundPlugin.rollup({
cwd: nuxt.options.rootDir,
patterns: createImportProtectionPatterns(nuxt, { context: 'nitro-app' }),
exclude: [/core[\\/]runtime[\\/]nitro[\\/](?:handlers|utils)/, ...sharedPatterns],
exclude: [/node_modules[\\/]nitro(?:pack)?(?:-nightly)?[\\/]|core[\\/]runtime[\\/]nitro[\\/](?:handlers|utils)/, ...sharedPatterns],
}),
)