mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 19:06:26 +00:00
37 lines
735 B
JavaScript
37 lines
735 B
JavaScript
const path = require("path");
|
|
const webpack = require("webpack");
|
|
|
|
module.exports = {
|
|
entry: "./src/index.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "./static/frontend"),
|
|
filename: "[name].js",
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: "babel-loader",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
optimization: {
|
|
minimize: true,
|
|
},
|
|
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
"process.env": {
|
|
// This has effect on the react lib size
|
|
NODE_ENV: JSON.stringify("production"),
|
|
},
|
|
}),
|
|
//new webpack.optimize.AggressiveMergingPlugin() //Merge chunks
|
|
],
|
|
resolve: {
|
|
extensions: ['.ts', '.js'],
|
|
},
|
|
}; |