-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[@vitejs/plugin-vue] Type definition generation in library mode is broken #5044
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
Labels
Comments
Still reproducible in plugin-vue 2.2.4. But I'm not sure what needs to be fixed here. |
This is caused by this change. Before when it is not during dev, it went through other plugins. But after it does not. |
7 tasks
7 tasks
jods4
added a commit
to jods4/vite
that referenced
this issue
Apr 26, 2022
Partial revert of 93d9a2d When building, TS scripts must not be inlined so that loaders (e.g. rollup-plugin-typescript2) are correctly applied. Fixes vitejs#5044, vitejs#5795, vitejs#7908
This was referenced Apr 26, 2022
Fixed by #7909 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
@vitejs/plugin-vue version 1.8.0 broke type definition generation in library mode.
Using version 1.7.1 the generation via rollup-plugin-typescript2 works like expected. From version 1.8.0 it does not longer generate type definitions for components but list them in the index.d.ts file.
Reproduction
Checkout https://github.com./mseele/vite-typescript2-output-broken and run
yarn install
and thenyarn build
In the
dist
directory aindex.d.ts
file will be generated with the reference to./components/Hello.vue
The
./components/Hello.vue.d.ts
file will not be generatedChange
@vitejs/plugin-vue
inpackage.json
to1.7.1
, runyarn install
and thenyarn build
againEverything works as expected: the missing
./components/Hello.vue.d.ts
file has been generatedSystem Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: