11const path = require ( 'path' ) ;
2-
32const ibexaConfigManager = require ( '@ibexa/frontend-config/webpack-config/manager' ) ;
4-
53const 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