From a2ac6be36b3d5ade56e3362a4cb847a73e384e29 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 3 Mar 2018 19:14:55 -0500 Subject: [PATCH] fix: mock process for 3rd party libs (close #934) --- packages/@vue/cli-service/lib/config/base.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/@vue/cli-service/lib/config/base.js b/packages/@vue/cli-service/lib/config/base.js index 4334ed1546..349c5c1924 100644 --- a/packages/@vue/cli-service/lib/config/base.js +++ b/packages/@vue/cli-service/lib/config/base.js @@ -92,8 +92,9 @@ module.exports = (api, options) => { // prevent webpack from injecting useless setImmediate polyfill because Vue // source contains it (although only uses it if it's native). setImmediate: false, - // process is injected via DefinePlugin - process: false, + // process is injected via DefinePlugin, although some 3rd party + // libraries may require a mock to work properly (#934) + process: 'mock', // prevent webpack from injecting mocks to Node native modules // that does not make sense for the client dgram: 'empty',