Fix clean webpack of esmodule

Signed-off-by: zhangrengao <zhangrengao1@huawei.com>
Change-Id: I2302e7d209c5cc98735ab5a416a5839cdcbaa2bd
This commit is contained in:
zhangrengao
2022-08-27 12:03:06 +08:00
parent d018567d54
commit 4050e203e0
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -143,6 +143,7 @@ export class GenAbcPlugin {
}
if (projectConfig.compileMode === ESMODULE) {
removeDir(output);
removeDir(projectConfig.nodeModulesPath);
}
+3
View File
@@ -346,6 +346,9 @@ function setGenAbcPlugin(env, config) {
}
function setCleanWebpackPlugin(workerFile, config) {
if (projectConfig.compileMode === 'esmodule') {
return;
}
let cleanPath = [];
cleanPath.push(projectConfig.buildPath);
if (workerFile) {