-
Notifications
You must be signed in to change notification settings - Fork 135
/
webpack.config.js
53 lines (45 loc) · 1.14 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* Webpack config
*
* @package LifterLMS/Scripts/Dev
*
* @since 5.5.0
* @version 6.10.0
*/
const { resolve } = require( 'path' ),
blocksConfig = require( '@lifterlms/scripts/config/blocks-webpack.config' ),
{ CleanWebpackPlugin } = require( 'clean-webpack-plugin' ),
generate = require( '@lifterlms/scripts/config/webpack.config' ),
config = generate( {
js: [
'admin-addons',
'admin-award-certificate',
'admin-certificate-editor',
'admin-elementor-editor',
'quill-wordcount',
// Module packages.
'components',
'icons',
'spinner',
'utils',
],
css: [
'admin-addons'
],
} );
// Remove the default directory clearer, since we include source JS in the assets/js directory we need to not clear the dest directory (for now).
config.plugins = config.plugins.filter( plugin => {
return 'CleanWebpackPlugin' !== plugin.constructor.name;
} );
// Modified clean.
config.plugins.push( new CleanWebpackPlugin( {
cleanOnceBeforeBuildPatterns: [
// Source maps.
`assets/js/*.js.map`,
],
} ) );
// config.entry.fontawesome = resolve( './src/scss/fontawesome.scss' );
module.exports = [
blocksConfig,
config
];