Skip to content

Conjecture

icefapper edited this page Nov 26, 2017 · 4 revisions

source: './a.js'

 import {B} from './b.js';
 export class A { constructor() { this.B = B; } }

source: './b.js'

 import {A} from './a.js';
 export class B extends A {}

source: './main.js'

 import './a.js';
 import './b.js';

the './main.js' bundle, if import './a.js' is run first

  class B extends A {}
  class A { constructor() { this.B = B; }

the './main.js' bundle, if import './b.js' is run first:

  class A { constructor() { this.B = B; }
  class B extends A {}