Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hokkaido opened this issue May 3, 2023 · 2 comments
Closed

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

hokkaido opened this issue May 3, 2023 · 2 comments

Comments

@hokkaido
Copy link

hokkaido commented May 3, 2023

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

Copy link
Member

posva commented May 3, 2023

Duplicate of #359

@posva posva closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
@vuejs vuejs locked and limited conversation to collaborators May 3, 2023
@posva
Copy link
Member

posva commented May 3, 2023

Please, search existing issues and pull requests before opening issues, it saves maintainers a lot of time 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants