MichalLytek / MichalLytek/typegraphql-prisma
Tackle the circular imports without needing to use `commonjs`
- Dominant language
- TypeScript
- Stars
- 918
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
Fantastic work on transpiling @MichalLytek.
I was thinking about how we could tackle the circular imports without needing to use `commonjs` on everything.
I was wondering if bundling all the transpiled code into a single file would be possible 🤔
Bundling would also reduce the size if only by removing all the import statements which in turn *may* reduce write time to disk as there is less to write and it is all in only a few files rather then what could be up to hundreds.
If we can reduce generation times that would be great as then we could also improve testing speed.
_Originally posted by @wSedlacek in https://github.com/MichalLytek/typegraphql-prisma/issues/1#issuecomment-685188342_
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name files, tests, or an entry point. Start by tracing the TypeScript generator's transpilation and output flow, then measure circular-import behavior, generated file counts, and generation time before evaluating a single-file bundling approach. Done means a documented approach or implementation that avoids requiring CommonJS everywhere without regressing generation or test speed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100