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
Vue upgrade #33167
Vue upgrade #33167
Conversation
|
||
In the case of `App.vue`, our default export sets the name of the component to `App` and registers the `HelloWorld` component by adding it into the `components` property. When you register a component in this way, you're registering it locally. Locally registered components can only be used inside the components that register them, so you need to import and register them in every component file that uses them. This can be useful for bundle splitting/tree shaking since not every page in your app necessarily needs every component. | ||
In the case of `App.vue`, two components `TheWelcome` and `HelloWorld` are registered by means of imports. When you register a component in this way, you're registering it locally. Locally registered components can only be used inside the components that register them, so you need to import and register them in every component file that uses them. This can be useful for bundle splitting/tree shaking since not every page in your app necessarily needs every component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this pre-exists the change, but consider explaining "bundle splitting/tree shaking"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, added a todo above
...en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.md
Show resolved
Hide resolved
...en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.md
Outdated
Show resolved
Hide resolved
...en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_rendering_lists/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsmth I've added some minor editorial comments/questions.
One question is whether we need to provide some versioning information here about the Vue we're targeting? I.e. Vue3/Vite?
What you've written holds together well. I've added approval, but I'm not a Vue expert by any means and I have not run this code. So you can merge if you like or wait for more expert review.
…meworks/vue_getting_started/index.md Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Thank you!
Good idea. Isn't there a note in related framework guides saying this article targets XYZ, I think we can do the same here. I will add to this PR.
Thank you! I revisited this again after doing an initial run though in January, so I think we're in a good place, but if I can get another pair of eyes on the example repo it would be great. I've tagged Vinyl, but I'll see if I can get someone to have a look in case I've missed anything. |
…meworks/vue_rendering_lists/index.md Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
...en-us/learn/tools_and_testing/client-side_javascript_frameworks/vue_getting_started/index.md
Outdated
Show resolved
Hide resolved
@hamishwillee - the related code has been merged (linked PR above) and I've added the notes as you suggested (in de67367 and 011cd23)! I'm going to merge now so both repos are in sync. Thanks a lot! |
Description
Updating the docs for Vue in parallel while updating the todo vue app.
Motivation
The versions we were suggesting are no longer current when using Vue starter templates. The prose here is based on experience upgrading in the linked PR.
The https://github.com/mdn/todo-vue app also had some security advisories, so it would be good to be using packages without known vulns.
Related issues and pull requests
TODO