-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support ".ts" modules #32
Conversation
This compiles ".ts" modules into ".d.ts" modules in-memory and forwards them to Rollup. This removes the need for intermediate files. Fixes Swatinem#31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good in general.
The problem with createProgram
is that it is an ahead-of-time operation, as is evident from the heavily increased runtime of the testsuite.
So in order not to regress performance in that case, it would be nice to:
- prefer
.d.ts
over.tsx?
files inside theresolveId
, essentially restoring it to what it was before - lazily call
createProgram
inside ofload
when you hit a.tsx?
file
I’m not quite sure though if calling createProgram
lazily will pick up all the files / compilerOptions
correctly (when you don’t start from the entry-point)
Co-Authored-By: Arpad Borsos <[email protected]>
Instead, I'm going to only use Using a Note: If you mix |
The failing tests are now unrelated to this PR. LGTM 👍 |
They are related, since you now return I can take care of this tomorrow when I’m at my work machine. |
This compiles ".ts" modules into ".d.ts" modules in-memory and forwards them to Rollup.
This removes the need for intermediate files.
Fixes #31