-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
29 lines (28 loc) · 978 Bytes
/
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
const CopyPlugin = require('copy-webpack-plugin');
const defaultConfig = require('@wordpress/scripts/config/webpack.config.js');
module.exports = {
...defaultConfig,
entry: {
'backend': './src/DoubleTheDonation/resources/js/admin/give-double-the-donation-admin.js',
'frontend': './src/DoubleTheDonation/resources/js/frontend/give-double-the-donation.js',
'template': './src/DoubleTheDonation/FormExtension/Template/index.tsx',
'block': './src/DoubleTheDonation/FormExtension/Block/index.tsx',
},
plugins: [
...defaultConfig.plugins,
new CopyPlugin({
patterns: [
{
from: './src/DoubleTheDonation/resources/images/*.{jpg,jpeg,png,gif}',
to() {
return 'images/[name][ext]';
},
},
],
}),
],
externals: {
$: 'jQuery',
jquery: 'jQuery',
},
};