Skip to content

fix(matcher): warn when route component is null in development#3944

Open
disjaiz wants to merge 1 commit intovuejs:devfrom
disjaiz:warn-null-route-component
Open

fix(matcher): warn when route component is null in development#3944
disjaiz wants to merge 1 commit intovuejs:devfrom
disjaiz:warn-null-route-component

Conversation

@disjaiz
Copy link
Copy Markdown

@disjaiz disjaiz commented Mar 3, 2026

What problem does this solve?

If a route is defined with component: null, Vue Router silently accepts it.
This can make import/export mistakes difficult to debug.

What does this change do?

Adds a development-only warning when a route is defined with a null component.

Tests

Added a unit test to verify the warning is triggered in development mode.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant