generated from myTerminal/template-chrome-extension-webpack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.prod.js
29 lines (27 loc) · 801 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
23
24
25
26
27
28
29
/* global require module */
const webpack = require("webpack");
const WebpackMerge = require("webpack-merge");
const commonConfig = require("./webpack.common.js");
const OptimizeCssAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ElmMinify = require("elm-minify");
const optimizeCSS = new OptimizeCssAssetsPlugin();
const elmMinify = new ElmMinify.WebpackPlugin();
module.exports = WebpackMerge(commonConfig, {
mode: "production",
plugins: [elmMinify],
module: {
rules: [
{
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
use: {
loader: "elm-webpack-loader",
options: {
optimize: true,
},
},
},
],
},
});