Vue · Middle · Question 31 of 75

How do you lazy-load a route component?

Explanation

The bundler creates a separate chunk that is downloaded on first navigation. Don't use defineAsyncComponent for route components - the router handles it.

Further reading

Problem with a question

Vue · Middle · question 31

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz