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
{{ message }}
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
If we have a single Vue 2 component with lang="ts", and we want to host this component on NPM to use it in multiple projects,
it's not 100% clear to me - given the requirements below - how to best use rollup to prepare the component for publishing on NPM.
Requirements:
generate .d.ts file based on prop types.
make sure the .d.ts creates autocomplete suggestions for props in VSCode when the component is imported into a project
make sure the component is usable in JS projects
make it clear how the component can be written in a way it's compatible with Vue 3 projects (or is this not possible at all?)
bonus feature: convert "sass" style-block to regular "css"
If there's a concrete example of how to do the above, I believe that would benefit a lot of Vue developers that wanna publish single Vue components!
The problem is, the third party vue-property-decorator is not ideal and not the way I'd want to write components.
My ideal setup would be components that are as close to regular JS vue components as possible. The ONLY thing I'd want is to be able to annotate the props with types that are auto completed when importing the component in another project.
What problem does this feature solve?
If we have a single Vue 2 component with
lang="ts"
, and we want to host this component on NPM to use it in multiple projects,it's not 100% clear to me - given the requirements below - how to best use rollup to prepare the component for publishing on NPM.
Requirements:
.d.ts
file based on prop types..d.ts
creates autocomplete suggestions for props in VSCode when the component is imported into a projectIf there's a concrete example of how to do the above, I believe that would benefit a lot of Vue developers that wanna publish single Vue components!
What does the proposed API look like?
An example of such an example would be:
The text was updated successfully, but these errors were encountered: