From 8283f46d0bd286e3c84245a94f360e683c153fd8 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Sat, 15 Jun 2019 13:23:05 +0800 Subject: [PATCH] fix: fix config merging during `vue invoke` in Node.js v12 (#4148) The root cause here is the same as #4095 The failing `loadModule` call will return `undefined` for a js config read operation, which later caused config being overwritten. --- packages/@vue/cli/lib/util/configTransforms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vue/cli/lib/util/configTransforms.js b/packages/@vue/cli/lib/util/configTransforms.js index abc397617..2d535c4ca 100644 --- a/packages/@vue/cli/lib/util/configTransforms.js +++ b/packages/@vue/cli/lib/util/configTransforms.js @@ -13,7 +13,7 @@ const isObject = val => val && typeof val === 'object' const transformJS = { read: ({ filename, context }) => { try { - return loadModule(filename, context, true) + return loadModule(`./${filename}`, context, true) } catch (e) { return null }