Closed vikingair closed 1 month ago
``` pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-meta@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-core@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-server@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-service@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/vue-tsc@4871 ```
``` pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@4871 ```
commit: 16ca1fd
LGTM, Thanks!
Also, I would like to know why the
code
needs to be default exported as a string containing the same TS code again. Is it maybe some artifact from the past and or only relevant to Vue2?
That's because the code snippet needs to be used as virtual code in vue-component-meta.
This would allow bundlers to tree shake the module code when imports are not done via
import type
.E.g.,
Also, I would like to know why the
code
needs to be default exported as a string containing the same TS code again. Is it maybe some artifact from the past and or only relevant to Vue2?