Logan Smyth (2016-08-11T00:29:23.000Z)
forbes at lindesay.co.uk (2016-08-25T10:38:28.818Z)
You could also swap that around to simplify the logic in the individual classes, e.g. ```js // --- Module A import C, {initC} from './c'; initC(); console.log('Module A', C) class A extends C { // ... } export {A as default} ``` then export that function to force-initialize the `C` variable. ```js // --- Module C import A from './a' import B from './b' var C; export function initC(){ if (C) return; C = class C { constructor() { // this may run later, after all three modules are evaluated, or // possibly never. console.log(A) console.log(B) } } } initC(); export {C as default}; ``` So all the individual classes have to do is call the `initC` function to ensure `C` has been properly initialized, then go from there. Note the usage of `var` here is also critical since `let` would throw a TDZ error.