UNPKG

632 BJavaScriptView Raw
1module.exports = function (chain) {
2 chain.node
3 .merge({
4 // prevent webpack from injecting useless setImmediate polyfill because Vue
5 // source contains it (although only uses it if it's native).
6 setImmediate: false,
7 // process is injected via DefinePlugin, although some 3rd party
8 // libraries may require a mock to work properly (#934)
9 process: 'mock',
10 // prevent webpack from injecting mocks to Node native modules
11 // that does not make sense for the client
12 dgram: 'empty',
13 fs: 'empty',
14 net: 'empty',
15 tls: 'empty',
16 child_process: 'empty'
17 })
18}