forked from mtmckenna/js13k2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.prod.js
22 lines (20 loc) · 857 Bytes
/
webpack.prod.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const InlineChunkHtmlPlugin = require("./inline-chunk-html-plugin");
const TerserJSPlugin = require("terser-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const HTMLInlineCSSWebpackPlugin = require("html-inline-css-webpack-plugin").default;
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;
module.exports = merge(common, {
mode: "production",
optimization: {
minimizer: [new TerserJSPlugin({}), new OptimizeCSSAssetsPlugin({})]
},
plugins: [
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [".js"]),
new HTMLInlineCSSWebpackPlugin(),
//new BundleAnalyzerPlugin({analyzerMode: "static"})
]
});