custom module: allow importing the main module without parsing it again
This commit is contained in:
parent
ba2c25b998
commit
c056b986fd
1 changed files with 5 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue