-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
34 lines (31 loc) · 1.05 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
const path = require('path');
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
const WebpackBuildNotifierPlugin = require('webpack-build-notifier');
const CleanTerminalPlugin = require('clean-terminal-webpack-plugin');
module.exports = {
...defaultConfig,
resolve: {
alias: {
'@utilities': path.resolve(__dirname, 'blocks/utilities'),
'@configuration': path.resolve(__dirname, 'blocks/configuration'),
},
extensions: ['.js', '.jsx'], // Add file extensions for easier resolution
},
module: {
...defaultConfig.module,
rules: [...defaultConfig.module.rules],
},
plugins: [
...defaultConfig.plugins,
new WebpackBuildNotifierPlugin({
title: 'Base Theme',
logo: path.resolve('./webpack_icons/favicon.png'),
suppressSuccess: true,
}),
new CleanTerminalPlugin({
beforeCompile: true,
message: 'New Build Started...',
onlyInWatchMode: true,
}),
],
};