Skip to content

Commit

Permalink
Merge pull request #763 from Financial-Times/x-engine-for-monorepo
Browse files Browse the repository at this point in the history
fix: do not override current resolvers
  • Loading branch information
juanSanchezAlcala authored Feb 15, 2024
2 parents fe588be + 1e659f3 commit 8bfc21b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/x-engine/src/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
})
Expand Down

0 comments on commit 8bfc21b

Please sign in to comment.