-
Notifications
You must be signed in to change notification settings - Fork 19
/
webpack.config.js
37 lines (36 loc) · 1.03 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
const defaultConfig = require( '@wordpress/scripts/config/webpack.config' );
const WooCommerceDependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );
const path = require( 'path' );
module.exports = {
...defaultConfig,
entry: {
payustandard: '/src/js/payustandard',
payulistbanks: '/src/js/payulistbanks',
payucreditcard: '/src/js/payucreditcard',
payusecureform: '/src/js/payusecureform',
payupaypo: '/src/js/payupaypo',
payuklarna: '/src/js/payuklarna',
payutwistopl: '/src/js/payutwistopl',
payuinstallments: '/src/js/payuinstallments',
payublik: '/src/js/payublik',
},
resolve: {
extensions: [ '.js', '.jsx', '.tsx', '.ts' ],
fallback: {
stream: false,
path: false,
fs: false,
},
},
output: {
path: path.resolve( __dirname, 'build/js/' ),
filename: '[name].js',
},
plugins: [
...defaultConfig.plugins.filter(
( plugin ) =>
plugin.constructor.name !== 'DependencyExtractionWebpackPlugin'
),
new WooCommerceDependencyExtractionWebpackPlugin(),
],
};