-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
fixed on 4.xThis issue has been already fixed on the v4 but exists in v3This issue has been already fixed on the v4 but exists in v3improvement
Description
Version
3.1.5
Reproduction link
https://codesandbox.io/s/vue-routing-example-em6dm?file=/router/index.js
Visit the /hello
page in the codesandbox reproduction and open the console to see the error message
Steps to reproduce
Setup lazy-loaded routes and make a mistake by forgetting that it must not be an import but a function that returns the import statement
const routes = [
{
path: '/',
name: 'Home',
component: import(/* webpackChunkName: "Home" */ '../views/Home.vue'),
}
]
What is expected?
An error message that says the component is not valid (because it is a promise) and that the expected type is a function
What is actually happening?
Vue shows the following error message:
Failed to mount component: template or render function not defined.
Metadata
Metadata
Assignees
Labels
fixed on 4.xThis issue has been already fixed on the v4 but exists in v3This issue has been already fixed on the v4 but exists in v3improvement