Skip to content

Commit cfe8ef5

Browse files
committed
Update webpack.config.js for 5.0
No need to add ibexaConfig to module.exports
1 parent ccbeb83 commit cfe8ef5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

code_samples/back_office/image_editor/config/webpack.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ const projectConfig = Encore.getWebpackConfig();
4747

4848
projectConfig.name = 'app';
4949

50+
module.exports = [...customConfigs, projectConfig];
51+
5052
/* Get ibexaConfig and ibexaConfigManager */
5153
const ibexaConfigManager = require('@ibexa/frontend-config/webpack-config/manager');
5254
const getIbexaConfig = require('@ibexa/frontend-config/webpack-config/ibexa');
@@ -58,6 +60,3 @@ ibexaConfigManager.add({
5860
entryName: 'ibexa-admin-ui-layout-js',
5961
newItems: [ path.resolve(__dirname, './assets/random_dot/random-dot.js'), ],
6062
});
61-
62-
/* Add ibexaConfig to module.exports */
63-
module.exports = [ibexaConfig, ...customConfigs, projectConfig];

docs/content_management/images/extend_image_editor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Configure the new Image Editor action under the `ibexa.system.<scope>.image_edit
3232
## Add entry to the Webpack configuration
3333

3434
Once you create and configure the React component, you must add an entry to [the Webpack configuration](3_customize_the_front_page.md#configuring-webpack).
35-
In the root directory of your project, modify the `webpack.config.js` file by adding the following code in replacement of the default `module.exports = [...customConfigs, projectConfig];`:
35+
In the root directory of your project, modify the `webpack.config.js` file by appending the following code:
3636

37-
``` js hl_lines="10 14"
38-
[[= include_file('code_samples/back_office/image_editor/config/webpack.config.js', 49, 63) =]]
37+
``` js hl_lines="10"
38+
[[= include_file('code_samples/back_office/image_editor/config/webpack.config.js', 51, 62) =]]
3939
```
4040
At this point you should be able to see a new button in the Image Editor's UI.
4141

0 commit comments

Comments
 (0)