2021-03-25 10:21:28 +02:00
|
|
|
const path = require('path');
|
|
|
|
const isProduction = process.env.NODE_ENV === 'production';
|
|
|
|
|
|
|
|
module.exports = {
|
2022-09-09 10:28:26 +03:00
|
|
|
devtool: isProduction ? 'source-map' : 'eval-source-map',
|
2021-03-25 10:21:28 +02:00
|
|
|
mode: isProduction ? 'production' : 'development',
|
|
|
|
target: 'web',
|
|
|
|
entry: {
|
2023-08-11 10:35:50 +01:00
|
|
|
'common': path.resolve('./resources/js/common.js'),
|
2021-03-25 10:21:28 +02:00
|
|
|
'gateway-settings': path.resolve('./resources/js/gateway-settings.js'),
|
2022-11-29 17:06:17 +04:00
|
|
|
'fraudnet': path.resolve('./resources/js/fraudnet.js'),
|
2022-07-12 14:44:08 +02:00
|
|
|
'oxxo': path.resolve('./resources/js/oxxo.js'),
|
2022-10-19 11:38:49 +03:00
|
|
|
'gateway-settings-style': path.resolve('./resources/css/gateway-settings.scss'),
|
2021-03-25 10:21:28 +02:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, 'assets/'),
|
|
|
|
filename: 'js/[name].js',
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [{
|
|
|
|
test: /\.js?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: 'babel-loader',
|
2022-10-19 11:38:49 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: 'css/[name].css',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{loader:'sass-loader'}
|
|
|
|
]
|
2021-03-25 10:21:28 +02:00
|
|
|
}]
|
|
|
|
}
|
|
|
|
};
|