fix(nuxt): exclude <srcDir>/index.html from import protection (#26430)

This commit is contained in:
Daniel Roe 2024-03-21 13:18:09 +00:00 committed by GitHub
parent 57b8d977b9
commit cca81bcae4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,7 +131,7 @@ async function initNuxt (nuxt: Nuxt) {
const config = {
rootDir: nuxt.options.rootDir,
// Exclude top-level resolutions by plugins
exclude: [join(nuxt.options.rootDir, 'index.html')],
exclude: [join(nuxt.options.srcDir, 'index.html')],
patterns: nuxtImportProtections(nuxt)
}
addVitePlugin(() => ImportProtectionPlugin.vite(config))