const HtmlWebpackPlugin = require('html-webpack-plugin');
const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
plugins: [
new HtmlWebpackPlugin({
"template": "./src\\index.html",
"filename": "./index.html",
"hash": false,
"inject": true,
"compile": true,
"favicon": false,
"minify": {
"caseSensitive": true,
"collapseWhitespace": true,
"keepClosingSlash": true,
"removeComments": true,
"removeRedundantAttributes": true
},
"cache": true,
"showErrors": true,
"chunks": "all",
"excludeChunks": [],
"title": "Webpack App",
"xhtml": true,
"chunksSortMode": "none"
}),
new ScriptExtHtmlWebpackPlugin({
defaultAttribute: 'defer'
}),
new CompressionPlugin({
test: /\.js(\?.*)?$/i
})
]
};