vuejs / docs

📄 Documentation for Vue 3
https://vuejs.org
Other
2.82k stars 4.14k forks source link

Add bundling with rollup to docs #683

Closed DonNicoJs closed 3 years ago

DonNicoJs commented 3 years ago

This PR adds a new block to the single-file-component.md file with a guide on how to bundle sfc with rollup.

The guide is oriented to library authors.

This is the first draft, also I am not completely sure it's the right place to add this, or if is better somewhere else / standalone entry

fixes #660

DonNicoJs commented 3 years ago

@NataliaTepluhina This is a first draft, I believe is quite rough and it needs some iteration to be presentable 😅

I was thinking that a boilerplate repository is probably a good addition ( as suggested by @JessicaSachs ) where such a repo should 'live' ? Shall I create it under my personal repositories or there is a better place for such things?

In the end I went quite minimal with the approach and discarded the composition api point completely since I think it is a bit out of the scope.

DonNicoJs commented 3 years ago

@znck Currently on my side I still have some quirks with the render functions, I was thinking to add this to a possible tips and trick section, but then I realised that RPV is still in beta ( I am still using the alpha ) so it probably does not make much sense to add things that are planned to be fixed ( or already fixed and not released )

DonNicoJs commented 3 years ago

This is a good start 🤩

Maybe we can add notes about typescript and vetur support too.

@znck Thanks! I've applied all the suggestions 😄 about Typescript, it falls out of my experience (I know I have to catch up with Typescript 😅 ) And I've never configured Vetur for vue3.

Do you think this is super important to have at the first version of this part of the docs or we can add those in a further iteration?

@NataliaTepluhina Is there anything else that need to change in. your opinion? WDYT? 🙇 🙇

znck commented 3 years ago

Typescript stuff can be done in a separate PR. 👍

DonNicoJs commented 3 years ago

@@skirtles-code Thank you so much for the review! And apologies for the slow turn-around, I manage to scavenge time for OSS only during the weekend 🙇 I think I've addressed all the points!

NataliaTepluhina commented 3 years ago

@DonNicoJs @skirtles-code thank you both so much for authoring the addition and for the thorough review! I believe right now there are no major blockers for merging this one and we can handle additions like TS in the follow-ups

DonNicoJs commented 3 years ago

@NataliaTepluhina Thank you very much! 🙇 🙇