Skip to content

How to use JSX in a script? #13069

Discussion options

You must be logged in to vote

To use JSX in your script, you need to declare the pre-processor language as tsx or jsx using the lang attribute. Here's an example: Playground

-<script setup lang="ts">
+<script setup lang="tsx">

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PeiTianHuang
Comment options

Answer selected by Alfred-Skyblue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants