-
Notifications
You must be signed in to change notification settings - Fork 16
/
webpack.dev.js
43 lines (42 loc) · 942 Bytes
/
webpack.dev.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
35
36
37
38
39
40
41
42
43
const path = require('path');
const common = require('./webpack.common.js');
const express = require('express')
const CopyWebpackPlugin = require('copy-webpack-plugin')
module.exports = common({
mode: 'development',
output: {
path: path.resolve(__dirname, 'dist/dev'),
filename: '[name].[contenthash].js',
publicPath: '/',
},
devtool: 'source-map',
devServer: {
historyApiFallback: true,
contentBase: 'dist',
https: false,
setup (app) {
app.use('/privacy.wasm/',
express.static(path.join(__dirname, 'public', 'privacy.wasm')));
}
},
plugins: [
new CopyWebpackPlugin(
[{ from: 'public'}],
),
],
optimization: {
moduleIds: 'hashed',
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all',
},
},
},
},
performance: {
hints: false,
},
});