Skip to content

Commit

Permalink
fix(nitro): fix regex for tracedFiles scanning (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored Oct 27, 2021
1 parent 3f5bba1 commit 6054d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rollup/plugins/externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}

Expand Down

0 comments on commit 6054d5b

Please sign in to comment.