You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a component library and I use vue-tsc to generate the types for my component and vite to build my components into .umd.jsand .esm.js. I had an issue trying to generate types with vue-tsc with this component.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
I'm trying to build a component library and I use
vue-tsc
to generate the types for my component andvite
to build my components into.umd.js
and.esm.js
. I had an issue trying to generate types withvue-tsc
with this component.UiCTA.vue
I solved the issue by putting the Typescript declaration inside a
script
without thesetup
attribute as adviced here.However, I now get an issue with
vite build
as pasted below. It seems like there is a syntax error.Reproduction
https://stackblitz.com/edit/vitejs-vite-kvjfs2?file=src/UiCTA.vue
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: