-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Description
Describe the bug
tsx parse error when build with latest vite & plugin
Reproduction
none
Steps to reproduce
after upgraded to latest vite & plugin version:
@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.0",
"vite": "^3.2.1",
all tsx file build with type declaration throw error:
[vite:build-import-analysis] Parse error @:36:91
file :....vue?vue&type=script&setup=true&lang.tsx:43:3
...
error during build:
Error: Parse error @:36:91
at parse$b (.../node_modules/.pnpm/vite@3.2.1_less@4.1.3/node_modules/vite/dist/node/chunks/dep-d29b4e33.js:33839:355)
at Object.transform (.../node_modules/.pnpm/vite@3.2.1_less@4.1.3/node_modules/vite/dist/node/chunks/dep-d29b4e33.js:43263:27)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
it's strange that it's ok when running with dev mode,
after I turn back to
"@vitejs/plugin-vue": "3.1.2",
"@vitejs/plugin-vue-jsx": "2.0.1",
"vite": "3.1.8",
everything is ok.
System Info
@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.0",
"vite": "^3.2.1",Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.