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: change isTSX option to opt-in #1064

Merged
merged 1 commit into from
Jan 15, 2024
Merged

fix: change isTSX option to opt-in #1064

merged 1 commit into from
Jan 15, 2024

Conversation

wattanx
Copy link
Collaborator

@wattanx wattanx commented Jan 13, 2024

πŸ”— Linked issue

Fixes: #1063

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

If you add isTSX, you cannot use angle-bracket syntax.
We would like to change it to opt-in as it would be inconvenient for users who do not use tsx.

(If it were possible to replace esbuild, I would replace it.)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@wattanx wattanx marked this pull request as ready for review January 13, 2024 12:16
@wattanx wattanx marked this pull request as draft January 13, 2024 13:47
@wattanx
Copy link
Collaborator Author

wattanx commented Jan 13, 2024

It can also be resolved at #1065.
I will open this if the migration to esbuild does not work.

@rchl
Copy link

rchl commented Jan 14, 2024

Shouldn't we stick to simple fixes like this one instead of migrating the whole build to esbuild? The latter sounds risky and I'm not sure if adding more work to Nuxt 2 which is in maintenance mode makes sense.

@rchl
Copy link

rchl commented Jan 14, 2024

Is it possible to enable this plugin per webpack rule so that we can target the one without isTSX for typescript files and one with isTSX for jsx/tsx?

Though maybe vue files would still be problematic since those don't explicitly state whether they are using tsx or not. But then the opt-in could be for vue files only rather than global.

@wattanx wattanx marked this pull request as ready for review January 14, 2024 22:38
@wattanx
Copy link
Collaborator Author

wattanx commented Jan 14, 2024

Shouldn't we stick to simple fixes like this one instead of migrating the whole build to esbuild?

Yes, I agree.
I am planning to introduce the migration to esbuild to reduce the differences with Nuxt 3.
(Nuxt Bridge is an upward compatible library)

@danielroe danielroe merged commit 7369831 into main Jan 15, 2024
33 checks passed
@danielroe danielroe deleted the fix/add-tsx-option branch January 15, 2024 10:20
This was referenced Jan 15, 2024
@github-actions github-actions bot mentioned this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using angle-bracket syntax in typescript
3 participants