Enrich the registration.md documentation with an example for application-wide global registration of "App" components
Description of Problem
As I was going through the VueSchool.io courses and their original Masterclass on Vue 3, I set out to build the project using Vite, Vue 3 and TypeScript.
At the global registration lesson, I saw that the Vue 3 documentation didn't include the code snippet the Vue 2 documentation included.
Proposed Solution
The update adds a code snippet to give an example about how to dynamically import the components that we'd want to be globally available.
It was included in the Vue 2 docs, so it could be a good addition to the Vue 3 docs as well.
Inspired by https://zerotomastery.io/blog/how-to-auto-register-components-for-vue-with-vite/ but uses a older and JavaScript solution.
Additional Information
None
Deploy Preview for vuejs ready!
| Name | Link |
|---|---|
| Latest commit | 65e9bac45d2abaaf5e41795b0991d281e8dc35a9 |
| Latest deploy log | https://app.netlify.com/sites/vuejs/deploys/65def287677e8d000809919e |
| Deploy Preview | https://deploy-preview-2716--vuejs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@JeremieLitzler
Thank you for your contribution! I like the snippet but I believe it would make the component registration documentation unnecessarily complex. The old Cookbook section in the old docs would be a perfect place for such a snippet, maybe Examples could work too?
@JeremieLitzler
Thank you for your contribution! I like the snippet but I believe it would make the component registration documentation unnecessarily complex. The old
Cookbooksection in the old docs would be a perfect place for such a snippet, maybeExamplescould work too?
Do you mean here https://github.com/vuejs/docs/tree/main/src/examples ?
If so, I can see to work something out.
@JeremieLitzler yes, I meant the Examples section (sorry for the delayed answer, I was on vacation)