woocommerce-paypal-payments/modules/ppcp-vaulting/webpack.config.js
Alex P a81a2ef7d1 Fix source maps in production
File source was huge because of that
2022-09-09 10:28:26 +03:00

22 lines
616 B
JavaScript

const path = require('path');
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
devtool: isProduction ? 'source-map' : 'eval-source-map',
mode: isProduction ? 'production' : 'development',
target: 'web',
entry: {
'myaccount-payments': path.resolve('./resources/js/myaccount-payments.js'),
},
output: {
path: path.resolve(__dirname, 'assets/'),
filename: 'js/[name].js',
},
module: {
rules: [{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel-loader',
}]
}
};