import { type A } from './types'
triggers error during build
#514
Labels
import { type A } from './types'
triggers error during build
#514
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
I recently upgraded an app I'm working on:
vite
from5.3.3
to6.0.7
@vitejs/plugin-vue
from5.0.5
to5.2.1
And the following code:
raised an error during
build
(thebuild-only
phase, not thetype-check
one):Reproduction
https://stackblitz.com/edit/vitejs-vite-xaslukcp
Steps to reproduce
npm run build
in terminalYou can then change the
import
on line 3 ofsrc/App.vue
:and run
npm run build
again to make it work.According to https://www.typescriptlang.org/docs/handbook/2/modules.html#import-type, both syntaxes are valid.
Also I don't know if it helps but the following Vanilla Vite project doesn't have the issue so I guess that's a problem with the Vue plugin.
System Info
Used Package Manager
npm (in reproduction), bun (locally)
Validations
The text was updated successfully, but these errors were encountered: