mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 09:25:54 +00:00
fix(nitro): fix regex for tracedFiles scanning (#1509)
This commit is contained in:
parent
7ede9b14d9
commit
0326a31990
@ -75,7 +75,7 @@ export function externals (opts: NodeExternalsOptions): Plugin {
|
||||
const pkgs = new Set<string>()
|
||||
for (const file of tracedFiles) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [_, baseDir, pkgName, _importPath] = /(.+\/node_modules\/)([^@/]+|@[^/]+\/[^/]+)\/(.*)/.exec(file)
|
||||
const [_, baseDir, pkgName, _importPath] = /^(.+\/node_modules\/)([^@/]+|@[^/]+\/[^/]+)(\/?.*?)?$/.exec(file)
|
||||
pkgs.add(resolve(baseDir, pkgName, 'package.json'))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user