From 1e659f3362fa8915ddaa90bf674a56f5f5c3f73e Mon Sep 17 00:00:00 2001 From: Juan Sanchez Alcala <102036944+juanSanchezAlcala@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:03:00 +0100 Subject: [PATCH] fix: do not override current resolvers --- packages/x-engine/src/webpack.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/x-engine/src/webpack.js b/packages/x-engine/src/webpack.js index 303562989..a84cb4696 100644 --- a/packages/x-engine/src/webpack.js +++ b/packages/x-engine/src/webpack.js @@ -24,11 +24,16 @@ module.exports = function () { return { apply(compiler) { + const alias = compiler?.options?.resolve?.alias + const configRuntimePath = alias && alias[config.runtime] ? alias[config.runtime] : runtimeResolution + const configRenderModule = + alias && alias[config.renderModule] ? alias[config.renderModule] : renderResolution assignDeep(compiler.options, { resolve: { alias: { - [config.runtime]: runtimeResolution, - [config.renderModule]: renderResolution + //Do not override current alias resolvers + [config.runtime]: configRuntimePath, + [config.renderModule]: configRenderModule } } })