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]; }