diff --git a/src/Bundle/ChillMainBundle/chill.webpack.config.js b/src/Bundle/ChillMainBundle/chill.webpack.config.js index 46a853ade..a6a69a954 100644 --- a/src/Bundle/ChillMainBundle/chill.webpack.config.js +++ b/src/Bundle/ChillMainBundle/chill.webpack.config.js @@ -1,30 +1,8 @@ const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' ); const { styles } = require( '@ckeditor/ckeditor5-dev-utils' ); -// Compile and loads all assets from the Chill Main Bundle -module.exports = function(encore, entries) +buildCKEditor = function(encore) { - // Push into "chill" entrypoint - entries.push(__dirname + '/Resources/public/main.js'); - - // Add new separate entrypoints - encore - .addEntry('login', __dirname + '/Resources/public/modules/login_page/index.js') - .addEntry('tabs', __dirname + '/Resources/public/modules/tabs/index.js') - - // chill2 new assets - .addEntry('ckeditor5', __dirname + '/Resources/public/modules/ckeditor5/index.js') - .addEntry('forkawesome', __dirname + '/Resources/public/modules/forkawesome/index.js') - //.addEntry('bootstrap', __dirname + '/Resources/public/modules/bootstrap/index.js') - ; - - // Aliases are used when webpack is trying to resolve modules (sass, typescript) - encore.addAliases({ - ChillMainSass: __dirname + '/Resources/public/sass', - ShowHide: __dirname + '/Resources/public/modules/show_hide' - }); - - //// Build CKEditor5 encore .addPlugin( new CKEditorWebpackPlugin( { language: 'fr', @@ -57,5 +35,33 @@ module.exports = function(encore, entries) } ) } ) ; +} + +// Compile and loads all assets from the Chill Main Bundle +module.exports = function(encore, entries) +{ + // Push into "chill" entrypoint + entries.push(__dirname + '/Resources/public/main.js'); + + // Add new separate entrypoints + encore + .addEntry('login', __dirname + '/Resources/public/modules/login_page/index.js') + .addEntry('tabs', __dirname + '/Resources/public/modules/tabs/index.js') + ; + + // Aliases are used when webpack is trying to resolve modules (sass, typescript) + encore.addAliases({ + ChillMainSass: __dirname + '/Resources/public/sass', + ShowHide: __dirname + '/Resources/public/modules/show_hide' + }); + + // Chill2 new assets + encore.addEntry('forkawesome', __dirname + '/Resources/public/modules/forkawesome/index.js'); + //encore.addEntry('bootstrap', __dirname + '/Resources/public/modules/bootstrap/index.js'); + + // CKEditor5 + buildCKEditor(encore); + encore.addEntry('ckeditor5', __dirname + '/Resources/public/modules/ckeditor5/index.js'); + }; \ No newline at end of file