From c056b986fd1471fe17803ed09fdd3d570227f880 Mon Sep 17 00:00:00 2001 From: jean-emmanuel <> Date: Mon, 22 Feb 2021 12:40:46 +0100 Subject: [PATCH] custom module: allow importing the main module without parsing it again --- src/server/custom-module.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/custom-module.js b/src/server/custom-module.js index f95297ae..6b6178cf 100644 --- a/src/server/custom-module.js +++ b/src/server/custom-module.js @@ -87,6 +87,11 @@ class CustomModule { load() { + if (this.submodule && path.resolve(this.filename) === path.resolve(this.parent.filename)){ + this.exports = this.parent.exports + return true + } + var code try {