-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat(vue): add typescript support #1920
base: master
Are you sure you want to change the base?
Conversation
hi @jackocnr friendly ping :) |
This looks amazing, thank you so much! A few questions/comments:
Again, thank you so much for this great work 💐 |
The problem is that the file and category names are the same, which may cause conflicts. what about |
Re: providing build files, I suppose we don't need to provide build files in the standard case e.g. if your project uses a build tool that supports TypeScript you can just import the Vue src file. The problem is for someone who is not using TS, and doesn't support it in their current build setup - how will they import the component? Or am I overthinking this? Do all Vue bundlers/build tools support TS by default? Re: the exports section in package.json, now I'm wondering: what's the point in adding the build paths here, when we don't provide those build files when the package is consumed? Again, I fear I'm missing something here - my understanding of these things might be flawed or out of date - if that's the case, forgive me! Re: future TODOs - I'm open to all of these ideas, but can you help me understand the benefits of each one? Perhaps it's better to discuss these ideas separately. Thanks again. |
but we build this before publishing and end up with pure js with no typscript only .d.ts types but next to the js files
exports it is just a wrapper for vue or more specifically for the d.ts plugin which needs an input file, it is just a feature of building with this solution. |
resolve: #1794
hi @jackocnr pls review :)
Changes:
Typed
input-props
andoptions
both components types support:
exportable
SomeOptions
not necessarily, but maybe in the future:use
modelValue
insteadvalue
forv-model
used vite multiple entries instead double run vite with custom configs.
TODO on future:
pnpm
with worksapces, and move build data toshared package
instead symlinks.grunt
e.g zx/vueWithUtils
-> kebab-case e.g/vue-with-utils