From 5a07fdad374d9d0536a6f9917535bf2798f35c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 23 Jun 2025 12:52:06 +0200 Subject: [PATCH] Made Ibexa DXP webpack modules work properly with symlinks --- ibexa/commerce/4.6/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/commerce/5.0/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/experience/4.6/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/experience/5.0/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/headless/4.6/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/headless/5.0/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/oss/4.6/encore/ibexa.webpack.custom.configs.js | 5 +++++ ibexa/oss/5.0/encore/ibexa.webpack.custom.configs.js | 5 +++++ 8 files changed, 40 insertions(+) diff --git a/ibexa/commerce/4.6/encore/ibexa.webpack.custom.configs.js b/ibexa/commerce/4.6/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/commerce/4.6/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/commerce/4.6/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/commerce/5.0/encore/ibexa.webpack.custom.configs.js b/ibexa/commerce/5.0/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/commerce/5.0/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/commerce/5.0/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/experience/4.6/encore/ibexa.webpack.custom.configs.js b/ibexa/experience/4.6/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/experience/4.6/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/experience/4.6/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/experience/5.0/encore/ibexa.webpack.custom.configs.js b/ibexa/experience/5.0/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/experience/5.0/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/experience/5.0/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/headless/4.6/encore/ibexa.webpack.custom.configs.js b/ibexa/headless/4.6/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/headless/4.6/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/headless/4.6/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/headless/5.0/encore/ibexa.webpack.custom.configs.js b/ibexa/headless/5.0/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/headless/5.0/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/headless/5.0/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/oss/4.6/encore/ibexa.webpack.custom.configs.js b/ibexa/oss/4.6/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/oss/4.6/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/oss/4.6/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; } diff --git a/ibexa/oss/5.0/encore/ibexa.webpack.custom.configs.js b/ibexa/oss/5.0/encore/ibexa.webpack.custom.configs.js index e8f46aaa..3797276f 100644 --- a/ibexa/oss/5.0/encore/ibexa.webpack.custom.configs.js +++ b/ibexa/oss/5.0/encore/ibexa.webpack.custom.configs.js @@ -1,8 +1,13 @@ +const Encore = require('@symfony/webpack-encore'); const customConfigs = require('./var/encore/ibexa.webpack.custom.config.js'); module.exports = customConfigs.reduce((configs, customConfigPath) => { let customConfig = require(customConfigPath); + if (typeof customConfig === 'function') { + customConfig = customConfig(Encore); + } + if (!Array.isArray(customConfig)) { customConfig = [customConfig]; }