2024-08-09 18:27:00 +02:00
|
|
|
const path = require( 'path' );
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
|
|
|
|
const DependencyExtractionWebpackPlugin = require( '@woocommerce/dependency-extraction-webpack-plugin' );
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
devtool: isProduction ? 'source-map' : 'eval-source-map',
|
|
|
|
mode: isProduction ? 'production' : 'development',
|
|
|
|
target: 'web',
|
|
|
|
plugins: [ new DependencyExtractionWebpackPlugin() ],
|
|
|
|
entry: {
|
2024-08-12 11:54:14 +02:00
|
|
|
'bancontact-payment-method': path.resolve(
|
|
|
|
'./resources/js/bancontact-payment-method.js'
|
2024-08-09 18:27:00 +02:00
|
|
|
),
|
2024-08-20 16:02:35 +02:00
|
|
|
'blik-payment-method': path.resolve(
|
|
|
|
'./resources/js/blik-payment-method.js'
|
|
|
|
),
|
2024-08-20 17:27:03 +02:00
|
|
|
'eps-payment-method': path.resolve(
|
|
|
|
'./resources/js/eps-payment-method.js'
|
|
|
|
),
|
2024-08-21 13:04:16 +02:00
|
|
|
'ideal-payment-method': path.resolve(
|
|
|
|
'./resources/js/ideal-payment-method.js'
|
|
|
|
),
|
2024-08-21 15:05:11 +02:00
|
|
|
'mybank-payment-method': path.resolve(
|
|
|
|
'./resources/js/mybank-payment-method.js'
|
|
|
|
),
|
2024-08-21 15:47:23 +02:00
|
|
|
'p24-payment-method': path.resolve(
|
|
|
|
'./resources/js/p24-payment-method.js'
|
|
|
|
),
|
2024-08-21 16:24:37 +02:00
|
|
|
'trustly-payment-method': path.resolve(
|
|
|
|
'./resources/js/trustly-payment-method.js'
|
|
|
|
),
|
2024-08-22 17:39:52 +02:00
|
|
|
'multibanco-payment-method': path.resolve(
|
|
|
|
'./resources/js/multibanco-payment-method.js'
|
|
|
|
),
|
2024-08-09 18:27:00 +02:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve( __dirname, 'assets/' ),
|
|
|
|
filename: 'js/[name].js',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.js?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: 'css/[name].css',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{ loader: 'sass-loader' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|