mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
webpack, ckeditor build in a function
This commit is contained in:
parent
a302749d00
commit
7a0f7a4933
@ -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');
|
||||
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user