Skip to content

Vue Component Type Build Error with __VUE_PROD_DEVTOOLS__ in Vite #13035

Closed
@Coreight98

Description

@Coreight98

Vue version

3.4.3

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-guabna1b?file=vite.config.ts&file=src%2Fcomponents%2FDynamicComponent.vue&terminal=dev

Steps to reproduce

  • In tsconfig.json, set the verbatimModuleSyntax option to false, and use the Component type without explicitly specifying type in the import statement.
  • In vite.config.ts, declare the __VUE_PROD_DEVTOOLS__ flag as 'false'.

What is expected?

The build should work correctly regardless of whether the import type statement is used.

What is actually happening?

Image

In the vite.config.ts file, when the __VUE_PROD_DEVTOOLS__ flag is declared, a build error occurs if you use Vue's Component type without explicitly specifying the type in the import statement.

System Info

Any additional comments?

No response

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