-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
50 lines (49 loc) · 1.57 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
const path = require('path');
module.exports = () => ({
plugins: require('./config/webpack/webpack.plugins.js'),
context: path.resolve(__dirname),
entry: './src',
target: 'web',
module: require('./config/webpack/webpack.module.js'),
output:
{ filename: '[name].js',
chunkFilename: '[name].js',
webassemblyModuleFilename: '[modulehash].module.wasm',
hotUpdateFunction: 'webpackHotUpdate',
jsonpFunction: 'webpackJsonp',
chunkCallbackName: 'webpackChunk',
globalObject: 'window',
libraryTarget: 'var',
path: path.resolve(__dirname,'dist'),
sourceMapFilename: '[file].map[query]',
hotUpdateChunkFilename: '[id].[hash].hot-update.js',
hotUpdateMainFilename: '[hash].hot-update.json',
chunkLoadTimeout: 120000,
hashFunction: 'md4',
hashDigest: 'hex',
hashDigestLength: 20 },
node:
{ process: true,
global: true,
Buffer: true,
setImmediate: true,
__filename: 'mock',
__dirname: 'mock' },
performance:
{ maxAssetSize: 250000,
maxEntrypointSize: 250000,
hints: 'warning' },
optimization: require('./config/webpack/webpack.optimization.js'),
resolve:
{ unsafeCache: true,
modules: [ 'node_modules' ],
extensions: [ '.wasm', '.mjs', '.js', '.json' ],
mainFiles: [ 'index' ],
aliasFields: [ 'browser' ],
mainFields: [ 'browser', 'module', 'main' ] },
resolveLoader:
{ unsafeCache: true,
mainFields: [ 'loader', 'main' ],
extensions: [ '.js', '.json' ],
mainFiles: [ 'index' ] },
infrastructureLogging: { level: 'info' } })