Skip to content

tsx parse error when use latest vite & plugin #10702

@coader

Description

@coader

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions