Skip to content

Commit 4bdd9a7

Browse files
authored
IBX-10331: Fixed memory leak while compiling assets (#248)
1 parent b77dba1 commit 4bdd9a7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
const path = require('path');
2-
32
const ibexaConfigManager = require('@ibexa/frontend-config/webpack-config/manager');
4-
53
const configManagers = require(path.resolve('./var/encore/ibexa.richtext.config.manager.js'));
64

7-
const getCustomConfig = (Encore) => {
5+
module.exports = (Encore) => {
86
Encore.reset();
97
Encore.setOutputPath('public/assets/richtext/build')
108
.setPublicPath('/assets/richtext/build')
119
.enableSassLoader()
12-
.disableSingleRuntimeChunk();
13-
14-
Encore.addEntry('ibexa-richtext-onlineeditor-js', [
15-
path.resolve(__dirname, '../public/js/CKEditor/core/base-ckeditor.js'),
16-
]).addStyleEntry('ibexa-richtext-onlineeditor-css', [
17-
path.resolve('./public/bundles/ibexaadminuiassets/vendors/ckeditor5/dist/ckeditor5.css'),
18-
path.resolve(__dirname, '../public/scss/ckeditor.scss'),
19-
]);
10+
.disableSingleRuntimeChunk()
11+
.configureBabelPresetEnv((config) => {
12+
config.useBuiltIns = false;
13+
config.corejs = false;
14+
});
2015

2116
Encore.addAliases({
2217
'@ckeditor': path.resolve('./public/bundles/ibexaadminuiassets/vendors/@ckeditor'),
@@ -25,6 +20,13 @@ const getCustomConfig = (Encore) => {
2520
'@ibexa-admin-ui': path.resolve('./vendor/ibexa/admin-ui'),
2621
});
2722

23+
Encore.addEntry('ibexa-richtext-onlineeditor-js', [
24+
path.resolve(__dirname, '../public/js/CKEditor/core/base-ckeditor.js'),
25+
]).addStyleEntry('ibexa-richtext-onlineeditor-css', [
26+
path.resolve('./public/bundles/ibexaadminuiassets/vendors/ckeditor5/dist/ckeditor5.css'),
27+
path.resolve(__dirname, '../public/scss/ckeditor.scss'),
28+
]);
29+
2830
const customConfig = Encore.getWebpackConfig();
2931

3032
customConfig.name = 'richtext';
@@ -42,5 +44,3 @@ const getCustomConfig = (Encore) => {
4244

4345
return customConfig;
4446
};
45-
46-
module.exports = getCustomConfig;

0 commit comments

Comments
 (0)