Skip to content
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

Enrich the registration.md documentation with an example for application-wide global registration of "App" components #2716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JeremieLitzler
Copy link
Contributor

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

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/
Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for vuejs ready!

Name Link
🔨 Latest commit 65e9bac
🔍 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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@NataliaTepluhina
Copy link
Member

@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
Copy link
Contributor Author

@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?

Do you mean here https://github.com/vuejs/docs/tree/main/src/examples ?

If so, I can see to work something out.

@NataliaTepluhina
Copy link
Member

@JeremieLitzler yes, I meant the Examples section (sorry for the delayed answer, I was on vacation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants