Skip to content

Commit c03e066

Browse files
authored
Update normalizeModuleFederationOptions.ts
1 parent 49eb233 commit c03e066

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/normalizeModuleFederationOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export interface ShareItem {
108108

109109
function removePathFromNpmPackage(packageString: string): string | undefined {
110110
// 匹配npm包名的正则表达式,忽略路径部分
111-
const regex = /^(?:@[^/]+\/)?[^/]+/;
111+
const regex = /^(?:@[^/]+\/)?([^@^/][^/]+)/;
112112

113113
// 使用正则表达式匹配并提取包名
114114
const match = packageString.match(regex);

0 commit comments

Comments
 (0)