Skip to content

Provide a way to disable warnings for "No match found" #1828

Closed as not planned
@hokkaido

Description

@hokkaido

What problem is this solving

At the moment, the router logs a "No match found" warning that cannot be disabled when it tries to resolve a route that doesn't exit.

There are more complex routing scenarios where the creation of initial routing table or the addition of a new route requires a check whether a route already exists, by calling the router instance's resolve method. The warning impairs the development cycle by polluting the log (both on client and server in an SSR context).

As an example, think of an SSR app with a backend where admin users can create additional redirects or aliases to hardcoded routes in the administration panel.

Proposed solution

Add a flag, disableWarnings, in the createRouter factory method to disable these kinds of warnings.

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions