-
Notifications
You must be signed in to change notification settings - Fork 262
/
Copy pathconfig.default.js
62 lines (57 loc) · 1.26 KB
/
config.default.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use strict';
const path = require('path');
module.exports = appInfo => ({
webpack: {
// keep this key name sync with webpack.common.js reservedKey
custom: {
depth: 1,
cssExtract: true,
// configPath: 'path/to/webpack/config/file',
},
mode: 'development',
output: {
path: './build',
filename: '[name].js?[hash]',
chunkFilename: '[name].js',
publicPath: '/build/',
},
resolve: {
extensions: ['.json', '.js', '.jsx', '.ts', '.tsx'],
alias: {
client: path.join(appInfo.baseDir, 'client'),
},
},
optimization: {
splitChunks: {
chunks: 'all',
name: 'manifest',
cacheGroups: {
default: false,
vendors: false,
manifest: {
test: /[\\/]node_modules[\\/]/,
},
},
},
noEmitOnErrors: true,
},
devServer: {
contentBase: false,
port: 6002,
noInfo: true,
quiet: false,
clientLogLevel: 'warning',
lazy: false,
watchOptions: {
aggregateTimeout: 300,
},
headers: { 'X-Custom-Header': 'yes' },
stats: {
colors: true,
chunks: false,
},
publicPath: '/build/',
hot: true,
},
},
});