custom module: allow importing the main module without parsing it again

This commit is contained in:
jean-emmanuel 2021-02-22 12:40:46 +01:00
parent ba2c25b998
commit c056b986fd

View file

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