-
Notifications
You must be signed in to change notification settings - Fork 7
/
webpack.config.js
52 lines (50 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
const path = require( 'path' );
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
module.exports = () => {
const configs = [
{
...defaultConfig,
entry: {
'checkout-cc': path.resolve(
__dirname,
'assets/js/checkout-cc.js'
),
'block-checkout-bizum': path.resolve(
__dirname,
'assets/js/block-checkout-bizum.js'
),
},
output: {
path: path.resolve( __dirname, 'public/js/' ), // Output directory
filename: '[name].min.js', // Use the entry name for the output file
},
},
{
...defaultConfig,
entry: {
'monei-blocks-checkout-cc': path.resolve(
__dirname,
'assets/css/monei-blocks-checkout.css'
),
},
output: {
path: path.resolve( __dirname, 'public/css/' ),
filename: '[name].js',
},
},
{
...defaultConfig,
entry: {
'monei-admin': path.resolve(
__dirname,
'assets/css/monei-admin.css'
),
},
output: {
path: path.resolve( __dirname, 'public/css/' ),
filename: '[name].js',
},
},
];
return configs;
};