mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
fix(nuxt3): don't double-escape extensions (#2953)
This commit is contained in:
parent
d20b672546
commit
8ea6b652b9
@ -95,7 +95,7 @@ export const pluginsDeclaration = {
|
||||
filename: 'plugins.d.ts',
|
||||
write: true,
|
||||
getContents: (ctx: TemplateContext) => {
|
||||
const EXTENSION_RE = new RegExp(`(?<=\\w)(${ctx.nuxt.options.extensions.map(e => `\\${escapeRE(e)}`).join('|')})$`, 'g')
|
||||
const EXTENSION_RE = new RegExp(`(?<=\\w)(${ctx.nuxt.options.extensions.map(e => escapeRE(e)).join('|')})$`, 'g')
|
||||
const tsImports = ctx.app.plugins.map(p => relative(ctx.nuxt.options.buildDir, p.src).replace(EXTENSION_RE, ''))
|
||||
|
||||
return `// Generated by Nuxt3'
|
||||
|
Loading…
Reference in New Issue
Block a user