web2019/webpack.config.js
2024-01-09 10:14:53 +08:00

43 lines
1.1 KiB
JavaScript

const path = require('path');
module.exports = {
entry: {
shop: './static/js/shop.jsx'
},
output: {
path: path.resolve(__dirname, './static/js'),
filename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
'babel-loader',
{
loader: "webpack-preprocessor-loader",
options: {
debug: false,
directives: {
render_count: false,
},
params: {
ENV: process.env.NODE_ENV,
},
verbose: false,
}
}
],
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js', '.jsx'],
},
//devtool: "inline-source-map",
//mode: "development"
devtool: false,
mode: "production"
};