mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
parent
e1d44262a5
commit
7eecc84f4d
@ -65,7 +65,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