Skip to content
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(turbopack): don't parse .ts files as .tsx #7121

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

ForsakenHarmony
Copy link
Member

@ForsakenHarmony ForsakenHarmony commented Jan 26, 2024

Description

We currently parse JSX syntax in all typescript files which is wrong.

Closes PACK-2302

Next.js PR: vercel/next.js#61219

Copy link

vercel bot commented Jan 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-designsystem-docs 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 5:28pm
examples-gatsby-web 🔄 Building (Inspect) Visit Preview 💬 Add feedback Jan 29, 2024 5:28pm
rust-docs ❌ Failed (Inspect) Jan 29, 2024 5:28pm
turbo-site ✅ Ready (Inspect) Visit Preview Jan 29, 2024 5:28pm
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-nonmonorepo ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 5:28pm

Copy link
Contributor

github-actions bot commented Jan 26, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

✅ This change can build next-swc

Copy link
Contributor

github-actions bot commented Jan 26, 2024

🟢 CI successful 🟢

Thanks

Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

/// Module with TypeScript code with references to imported types
TypescriptWithTypes,
TypescriptWithTypes { tsx: bool },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we convert WithTypes into a Boolean field too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was wondering if there's a good reason it isn't

@ForsakenHarmony ForsakenHarmony force-pushed the hrmny/pack-2302-dont-parse-ts-files-as-tsx branch from 5b98e9c to 52a9bca Compare January 29, 2024 17:26
@ForsakenHarmony ForsakenHarmony merged commit 550126e into main Jan 29, 2024
53 of 54 checks passed
@ForsakenHarmony ForsakenHarmony deleted the hrmny/pack-2302-dont-parse-ts-files-as-tsx branch January 29, 2024 20:31
ForsakenHarmony added a commit to vercel/next.js that referenced this pull request Jan 29, 2024
### What?

We currently parse JSX syntax in all typescript files which is wrong.

Closes PACK-2302

Turbo PR: vercel/turbo#7121

### Turbopack Updates

* vercel/turbo#7099 <!-- Donny/강동윤 -
fix(turbopack): Fix panic from `EcmascriptModuleFacadeModule::content`
-->
* vercel/turbo#7121 <!-- Leah - fix(turbopack):
don't parse `.ts` files as `.tsx` -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants