From 0b9cd1b408030685a4d4b9ee5a1f6d91706e486d Mon Sep 17 00:00:00 2001 From: Clark Du Date: Sun, 10 Dec 2017 01:30:00 +0800 Subject: [PATCH] fix: Error: Module did not self-register --- lib/builder/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/builder/builder.js b/lib/builder/builder.js index 6000724fbd..4d5e3bdb6d 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -475,7 +475,7 @@ export default class Builder { /* istanbul ignore if */ if (err) return reject(err) // not keep modified or deleted items in Vue.prototype - Object.keys(require.cache).forEach(key => delete require.cache[key]) + Object.keys(require.cache).forEach(key => !/\.node$/.test(key) && delete require.cache[key]) }) ) return