-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fix TS transpile in CLI #1273
Fix TS transpile in CLI #1273
Conversation
9f12658
to
c2e39ed
Compare
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.
🙌
Trying to understand the difference between typescript and babel package. https://www.typescriptlang.org/docs/handbook/babel-with-typescript.html
Would this be a problem for us with our other library packages? (ie. |
No, Babel would only be used for project scaffolding and generating route files. E.g. you choose any combination of options in the init flow for a new project, we generate that in TS and then we transpile it to JS if that's what you chose. When doing that, we don't need to generate |
So at the end I'm reverting to TS again and just keeping this PR to fix the original issue and a minor refactor of unnecessary things we were doing. The reason is that it doesn't seem like Babel installs faster than TS (2.8s Babel vs 1.8s TS in my tests) even though it's smaller. Probably related to the deep tree of dependencies it has. |
It looks like something changed in Remix and
remixConfig.tsconfigPath
now returns thejsconfig.json
path when present instead ofundefined
like before (I think?). We were using that to detect if the project was TS or JS.This PR fixes that issue and also replaces
typescript
with@babel/core
+@babel/preset-typescript
, which is 30MB smaller.