I have two files with their own modules, Sub.js and Parent.js
Parent.js:
import Sub from "/.Sub.js"
export default class Parent {
static createSomething(){
new Sub();
}
}
Sub.js:
import Parent from "/.Parent.js"
export default class Sub extends Parent {
contructor(){}
}
With that I get error:
ReferenceError: can't access lexical declaration`X' before initialization
Sub-module cannot be used because Parent-module is needed, but importing Parent-module requires importing Sub-module, I think?
This could be resolved by putting them in the same file, but I wonder if there is a way of keeping them as seperates files.