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

This commit is contained in:
Daniel Roe 2025-03-06 22:39:31 +00:00 committed by GitHub
parent d167bfc0ae
commit 3e0698b4a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -421,7 +421,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],
}),
)