Conflicting details on async components with vue router
The vue docs appear to conflict with vue router's advice on using async components for routes.
"Do not use Async components for routes. Async components can still be used inside route components but route component themselves are just dynamic imports." from Vue Router Docs
Deploy Preview for vuejs ready!
| Name | Link |
|---|---|
| Latest commit | ab194de38320fcc42b5dcea33bf229123cccffda |
| Latest deploy log | https://app.netlify.com/sites/vuejs/deploys/62e7f33b801d230008a0381c |
| Deploy Preview | https://deploy-preview-1869--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 settings.
@skirtles-code agree would be better to guide best practice here. In Vue 2 I used to follow Chris fritz' approach: https://github.com/bencodezen/vue-enterprise-boilerplate/blob/main/src/router/routes.js#L99
But I'm not sure what is the best minimal example to suggest or reference for asynchronous loading routes in Vue 3 with Vite.
I've made a change to the wording in #1896, now merged. I think that addresses the concerns raised here while keeping as close to the original meaning as possible.
Thanks again!