From e9c19da64c436ac3b7edb129ed5d283c97bf4159 Mon Sep 17 00:00:00 2001 From: laibo102 Date: Tue, 29 Mar 2022 17:28:39 +0800 Subject: [PATCH] update: webpack.config Signed-off-by: laibo102 Change-Id: I1f3daedc2e81c25637d13535e57fe1640ecd814d --- compiler/webpack.config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/webpack.config.js b/compiler/webpack.config.js index d2bdbe2..a491278 100644 --- a/compiler/webpack.config.js +++ b/compiler/webpack.config.js @@ -125,6 +125,11 @@ function initConfig(config) { cacheDirectory: path.resolve(projectConfig.cachePath, '.ets_cache') }; } + if (!projectConfig.aceModuleJsonPath) { + config.resolve.modules.push(path.join(projectPath, '../../../../node_modules/')); + } else if (projectConfig.aceModuleJsonPath) { + config.resolve.modules.push(path.join(projectPath, '../../../node_modules/')); + } } function setProjectConfig(envArgs) {