-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
Import of types error (cyclic import is imported, cause it does breaks functionality):
// a.js
import { B } from '@/b';
import { NotRuntime } from '@/c';
export class A {
constructor(public name: NotRuntime) {}
}
export const b = new B();
b.print(new A('This is a random name'));
// b.ts
import { A } from '@/a';
export class B {
print(a: A) {
console.log(a.name);
}
}
// c.ts
export type NotRuntime = string;
throw new Error('Should never happen, until `import "@/c"`');
Produces invalid code with circular dependencies. When without paths and this plugin, resulting b.js does not content require('./a.js')
, which resolves circular dependency error.
Metadata
Metadata
Assignees
Labels
No labels