Updated webpack config for prod builds.

This commit is contained in:
2020-07-18 22:22:20 +02:00
parent 0dd3944fd2
commit 7ce54306b7
7 changed files with 99 additions and 51 deletions

View File

@@ -0,0 +1,28 @@
"use strict";
const HtmlWebpackPlugin = require("html-webpack-plugin");
const helpers = require("./helpers");
const VinlottisConfig = {
entry: {
planetposen: ["@babel/polyfill", helpers.root("frontend", "main")]
},
optimization: {
minimizer: [
new HtmlWebpackPlugin({
chunks: ["planetposen"],
filename: "../index.html",
template: "./frontend/index.html",
inject: true,
minify: {
removeComments: true,
collapseWhitespace: false,
preserveLineBreaks: true,
removeAttributeQuotes: true
}
})
]
}
};
module.exports = VinlottisConfig;