-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue Component Type Build Error with __VUE_PROD_DEVTOOLS__ in Vite #13035
Comments
vue only exports the Component's type definition, there is no associated class or method implementation, if you set verbatimModuleSyntax: false, it does cause the problem you mentioned. I think this might be as expected though? I haven't found a role for VUE_PROD_DEVTOOLS in this, it seems to fail to package/render whether the VUE_PROD_DEVTOOLS value is set or not |
Since our company project is private, I created a new project on StackBlitz to help explain the issue! In the local environment, the build works fine if the What’s strange is that the default value of So, I thought it might be related to |
Thanks for the report. The issue is caused by Additionally, the root cause in this case relates to the non-inline mode compiler: minimal reproduction. |
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
tsconfig.json
, set theverbatimModuleSyntax
option tofalse
, and use theComponent
type without explicitly specifying type in the import statement.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?
In the
vite.config.ts
file, when the__VUE_PROD_DEVTOOLS__
flag is declared, a build error occurs if you use Vue'sComponent
type without explicitly specifying the type in the import statement.System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: