diff --git a/compiler/src/gen_abc_plugin.ts b/compiler/src/gen_abc_plugin.ts index 5b11e15..30dc6c0 100644 --- a/compiler/src/gen_abc_plugin.ts +++ b/compiler/src/gen_abc_plugin.ts @@ -143,6 +143,7 @@ export class GenAbcPlugin { } if (projectConfig.compileMode === ESMODULE) { + removeDir(output); removeDir(projectConfig.nodeModulesPath); } diff --git a/compiler/webpack.config.js b/compiler/webpack.config.js index ebb7678..a9c2391 100644 --- a/compiler/webpack.config.js +++ b/compiler/webpack.config.js @@ -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) {