Closed myckhel closed 3 years ago
Seems you are trying to use jsx in a js file (resources/js/app.js
)
This is not possible, due to that Vite assumes that js files contain only js valid syntax
But jsx has another AST and therefore is only supported in jsx files
If my assumption is correct, please close the issue and use jsx as file extension
Thank you for your response.
Error solved 👍🏽 .
I have a vendor library, react-csv
, that includes JSX in .js
files. Naturally, I see the same class of error:
> node_modules/react-csv/src/components/Link.js:110:6: error: Unexpected "<"
110 │ <a
Is there any guidance for this situation, or is it really a non-starter?
Same issue. I have used jsx in .vue file. what's your solution? Thanks!
You my try to contact these library teams and tell them they should use valid extension names for their files.
It's kinda writing markdown in a plain .txt
file 🤔
Describe the bug
Reproduction
Vite build error
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager:
Logs
Before submitting the issue, please make sure you do the following