check webpack assets entrypoints

This commit is contained in:
Mathieu Jaumotte 2021-03-20 21:54:07 +01:00
parent 6efa795f2a
commit e78855fe0c
2 changed files with 38 additions and 18 deletions

View File

@ -1,5 +1,7 @@
// import jQuery
const $ = require('jquery');
// create global $ and jQuery variables
global.$ = global.jQuery = $;
@ -15,22 +17,31 @@ global.select2 = select2;
import {chill} from './js/chill.js';
global.chill = chill;
// css
/*
* load requirements in chill entrypoint
*/
require('./sass/scratch.scss');
//require('./css/scratch.css');
require('./css/chillmain.css');
require('./css/pikaday.css');
require('./js/collection/collections.js');
// in node-modules
require('select2/dist/css/select2.css');
//require('./css/select2/select2.css');
require('./modules/breadcrumb/index.js');
require('./modules/download-report/index.js');
//require('./css/scratch.css');
//require('./css/select2/select2.css');
require('select2/dist/css/select2.css');
require('./modules/select_interactive_loading/index.js');
require('./modules/export-list/export-list.scss');
// img
/*
* load img
*/
require('./img/favicon.ico');
require('./img/logo-chill-sans-slogan_white.png');
require('./img/logo-chill-outil-accompagnement_white.png');
require('./img/logo-chill-outil-accompagnement_white.png');

View File

@ -1,17 +1,26 @@
// this file loads all assets from the Chill main bundle
module.exports = function(encore, entries) {
module.exports = function(encore, entries)
{
// Push into "chill" entrypoint
entries.push(__dirname + '/Resources/public/main.js');
encore
.addEntry('login',
__dirname + '/Resources/public/modules/login_page/index.js')
.addEntry('tabs',
__dirname + '/Resources/public/modules/tabs/index.js')
.addEntry('ckeditor5',
__dirname + '/Resources/public/modules/ckeditor5/index.js')
// Add new separate entries
.addEntry('login', __dirname + '/Resources/public/modules/login_page/index.js')
.addEntry('tabs', __dirname + '/Resources/public/modules/tabs/index.js')
// chill2 assets
.addEntry('forkawesome', __dirname + '/Resources/public/modules/forkawesome/index.js')
// Alias are used by Webpack when trying to resolve modules
// cfr. https://github.com/symfony/webpack-encore/pull/217/files#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346
.addAliases({
ShowHide: __dirname + '/Resources/public/modules/show_hide/',
ChillMainSass: __dirname + '/Resources/public/sass'
// sass resolve
ChillMainSass: __dirname + '/Resources/public/sass',
// typescript resolve
ShowHide: __dirname + '/Resources/public/modules/show_hide'
})
;
};
};