-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathwebpack.prod.js
More file actions
27 lines (26 loc) · 733 Bytes
/
webpack.prod.js
File metadata and controls
27 lines (26 loc) · 733 Bytes
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
const path = require('path')
const merge = require('webpack-merge')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const clean = CleanWebpackPlugin
const html = require('html-webpack-plugin')
const favicon = require('favicons-webpack-plugin')
const common = require('./webpack.config.js')
module.exports = merge(common, {
mode: 'production',
optimization: {
splitChunks: {
chunks: 'all',
},
},
plugins: [
new clean(),
new html({
template: path.join(__dirname, 'src', 'views', 'index.html'),
config: '__WEBPACK_INJECT_CONFIG__'
}),
new favicon({
logo: path.resolve(__dirname, 'src', 'ressources', 'favicon.png'),
prefix: 'assets/favicon/'
}),
],
})