Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nitro): fix externals regex for scoped packages
Browse files Browse the repository at this point in the history
closes #238
  • Loading branch information
pi0 committed Jul 15, 2021
1 parent e1d4426 commit 7eecc84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nitro/src/rollup/plugins/externals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}

Expand Down

0 comments on commit 7eecc84

Please sign in to comment.