Skip to content

Preserve type definition node information during parsing #619

@wh1teAlter

Description

@wh1teAlter

Related plugins

Description

I am currently improving babel-plugin-jsx to make it support more comprehensive automatic inference and runtime props injection, as mentioned in the documentation

However, I noticed that since
https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue-jsx/src/index.ts
@babel/plugin-transform-typescript is referenced here, and this library cannot preserve sufficient TypeScript type nodes, it resulted in the failure to inject props

Suggested solution

Is it possible to use @babel/plugin-syntax-typescript or other similar libraries to retain sufficient TypeScript type node information for automatic props injection during compilation?

Alternative

No response

Additional context

Currently, we have attempted automatic props injection under @babel/plugin-syntax-typescript, and it appears to be functioning correctly

https://github.com/vuejs/babel-plugin-jsx/pull/766

Validations

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions