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

Lazy load #1129

Open
w3bdesign opened this issue Aug 1, 2023 · 0 comments
Open

Lazy load #1129

w3bdesign opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@w3bdesign
Copy link
Owner

A more common use-case is to lazily load a component associated to a route: when the user clicks on a link to navigate to a route, the route’s component must be lazily loaded first, before the navigation is done. It’s pretty straightforward: you use the same dynamic import syntax, but in the route declaration: Listing 131. router.ts { path: '/races', component: () => import('@/views/Races.vue') }, And you’re done! The bundler will create a separate bundle for the Races component, and that bundle will be loaded only when

@w3bdesign w3bdesign self-assigned this Aug 1, 2023
@w3bdesign w3bdesign added the enhancement New feature or request label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant