Skip to content

Commit 8146eee

Browse files
wewoormumiao
authored andcommitted
fix(build): replace the path named mo with relative path
1 parent a809494 commit 8146eee

File tree

2 files changed

+2093
-180
lines changed

2 files changed

+2093
-180
lines changed

build/gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function replacePath(code, filePath, importOptions) {
1010
const targetPath = path.resolve(output);
1111
const relativePath = path.relative(sourcePath, targetPath);
1212
const finalPath = relativePath ? './' + relativePath + '/' : './';
13-
return code.replace(/([from|import]\s+)'mo\//g, "$1'" + finalPath);
13+
return code.replace(/([from|import]\s+)'(mo\/|\bmo\b)/g, "$1'" + finalPath);
1414
}
1515

1616
function relativeImport(compilerOptions) {

0 commit comments

Comments
 (0)