-
-
Notifications
You must be signed in to change notification settings - Fork 611
Description
- Rollup Plugin Name: @rollup/plugin-typescript
- Rollup Plugin Version: 8.2.1
- Rollup Version: 2.30
- Operating System (or Browser): (Replit)
- Node Version: v12.16.2
- Link to reproduction (
⚠️ read below): https://replit.com/@gamelaster/rollup-typescript-circular-repro
Expected Behavior
The decorator should print undefined, and continue (and it later usage, the reference should be correct)
Actual Behavior
Decorator throws error, since it tries directly to use Class1 before initialization
Additional Information
This is very simple showcase of circular dependency problem,
although, this have little back story.
I'm trying to use Sapper, together with TypeORM.
The way that TypeORM makes one-to-one relation,
it makes a circular dependency. Although, in this case, it's correct and in app run directly by TypeScript,
it works fine. Although, when using it with rollup, same issue happening as in this REPL.
Please, let me know if this should be assigned directly to rollup (not the plugin), or if it's possible to solve it
through some rollup configuration. I invested several hours of searching for solution, although, after all
I decided to post it as bug here to this plugin.
Thanks