web2019/webpack.config.js

51 lines
1.4 KiB
JavaScript
Raw Normal View History

const path = require('path');
module.exports = {
entry: {
shop: './static/js/shop.jsx'
},
output: {
path: path.resolve(__dirname, './static/js'),
filename: '[name].bundle.js'
},
target: ['web', 'es5', 'browserslist:ie 11'],
module: {
rules: [
{
test: /\.(js|jsx)$/,
//exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
},
{
loader: "webpack-preprocessor-loader",
options: {
debug: false,
directives: {
render_count: false,
options_log: false
},
params: {
ENV: process.env.NODE_ENV,
disable_card_highlight: false
},
verbose: false,
}
}
],
}
]
},
2023-12-12 18:21:09 +08:00
resolve: {
extensions: ['.tsx', '.ts', '.js', '.jsx'],
},
//devtool: "inline-source-map",
//mode: "development"
devtool: false,
mode: "production"
};