fix(cli): compile commonjs module

This commit is contained in:
陈嘉涵
2019-12-12 16:20:15 +08:00
parent 19ceb9dddb
commit 71415e467d
5 changed files with 55 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ async function compileDir(dir: string) {
}
if (isScript(filePath)) {
return compileJs(filePath);
return compileJs(filePath, { reloadConfig: true });
}
if (isStyle(filePath)) {
@@ -129,7 +129,7 @@ async function buildPackageEntry() {
setModuleEnv('commonjs');
await copy(esEntryFile, libEntryFile);
await compileJs(libEntryFile);
await compileJs(libEntryFile, { reloadConfig: true });
await compileStyle(styleEntryFile);
stepper.success('Build Package Entry');