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.
This commit is contained in:
Haoqun Jiang
2019-06-15 13:23:05 +08:00
committed by GitHub
parent 570588ffb1
commit 8283f46d0b

View File

@@ -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
}