The Wayback Machine - https://web.archive.org/web/20250305095113/https://github.com/vuejs/vue-router/issues/2038
Skip to content

Throw exception or provide info message when route's component is null #2038

Open
@mortyccp

Description

What problem does this feature solve?

Currently, route's component can be null and it give no information and error. Provide information or raising error can help users to catch they have some import issues when they use

import * as components from './components'

export default [
  {
    path: '/accounts',
    component: components.AccountsListView,
    name: 'accountsListView'
  },
  {
    path: '/accounts/create',
    component: components.CreateEditAccounts,
    name: 'createAccounts'
  }
]

So if components.CreateEditAccounts is null, they will know what went wrong easier.

What does the proposed API look like?

Raise error when component is null or log info message.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions