I have a requirement to load some module first of all, because this module is needed in inheritance. The problem is that TypeScript start extending immediately even if the base class has not been loaded. The question is: is there any plugin which can change loading order? Thanks.
Context.ts
import { Transform } from './Transform';
import { Form } from './Form';
export class Context {
public transform() {
return new Transform(this);
}
public toFormContext() {
return new Form(this);
}
}
Transform.ts
import { Context } from './Context';
export class Transform extends Context {
constructor(base: Context) {
super();
}
}
Form.ts
import { Context } from './Context';
export class Form extends Context {
constructor(base: Context) {
super();
}
}
I need to tell webpack that Context.ts should be loaded first of all, because the others are needed in it higher than Context.ts in them as it address to them in runtime, but the others address Context.ts immediately.