-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
34 lines (33 loc) · 888 Bytes
/
webpack.config.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
30
31
32
33
34
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
entry: './archiv/aktuell/index.js',
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'data/www'),
},
mode: 'production',
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: './archiv/aktuell/index.html', // Your HTML file
filename: 'index.html', // The output HTML file
favicon: './archiv/aktuell/favicon.png', // Add this line to include the faviconnp
}),
new CompressionPlugin({
filename: '[path][base].gz',
algorithm: 'gzip',
test: /\.js$|\.css$|\.html$/,
threshold: 0,
minRatio: 0.8,
}),
],
};