Registry / web-framework / vite-plugin-router-warn

vite-plugin-router-warn

JSON →
library2.0.0jsnpmunverified

A Vite plugin that suppresses the 'No match found for location with path' warning from vue-router during development. Version 2.0.0 is stable, with infrequent updates. It works by patching vue-router's internal warning suppressor to silence that specific warning when routes are dynamically added or refreshed. Only active in development mode, processes only vue-router files, and runs once at startup. Provides optional export of modified router file for debugging. Designed as a temporary fix until vue-router provides native support to disable the warning.

npm install vite-plugin-router-warn
INSTALL
IMPORT
SIG · VITE-PLUGIN-ROUTER
V
vite-plugin-router-warn
web-frameworkjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

removeNoMatch
import removeNoMatch from 'vite-plugin-router-warn'
import { removeNoMatch } from 'vite-plugin-router-warn'
Default import only. Named import is incorrect.
removeNoMatch
const removeNoMatch = require('vite-plugin-router-warn').default
const removeNoMatch = require('vite-plugin-router-warn')
In CommonJS, you must use .default to get the default export.
vite-plugin-router-warn types
import type { RemoveNoMatchOptions } from 'vite-plugin-router-warn'
TypeScript types ship with the package. Use import type for option types.

Demonstrates how to install and configure the plugin in a Vite project to suppress vue-router warnings.

// vite.config.ts import { defineConfig } from 'vite'; import vue from '@vitejs/plugin-vue'; import removeNoMatch from 'vite-plugin-router-warn'; export default defineConfig({ plugins: [vue(), removeNoMatch()] });
Debug
Known issues
gotchaThe plugin only works in development mode. In production builds, the warning is not suppressed.
fix
No action needed; this is by design. The warning does not appear in production because vue-router does not show it in production builds.
affects: >=1.0.0
gotchaThe plugin modifies vue-router's internal module at runtime, which could break with vue-router updates.
fix
Check compatibility when upgrading vue-router. The plugin may need an update if vue-router internals change.
affects: >=1.0.0
deprecatedIf vue-router provides official configuration to suppress the warning, this plugin will become obsolete.
fix
Monitor vue-router changelog for 'suppressNoMatchWarning' or similar option. Then remove this plugin.
affects: >=1.0.0
gotchaThe plugin runs only once at startup. Dynamic routes added later still triggered the warning until patched; the plugin may not cover all cases.
fix
Ensure route additions happen before the initial page load, or reload the page after adding routes.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'vite-plugin-router-warn'
The package is not installed or is missing from node_modules.
fix
Run npm install vite-plugin-router-warn -D or yarn add vite-plugin-router-warn -D
SyntaxError: Named export 'removeNoMatch' not found. The requested module 'vite-plugin-router-warn' is a CommonJS module, which may not support all module.exports as named exports.
Using named import instead of default import.
fix
Change to `import removeNoMatch from 'vite-plugin-router-warn'`
TypeError: removeNoMatch is not a function
Using the plugin with `plugins: [vue(), removeNoMatch]` instead of `plugins: [vue(), removeNoMatch()]`.
fix
Invoke the plugin as a function: removeNoMatch()
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
OpenAI (training)
1
Resources
vite-plugin-router-warn — npm install vite-plugin-router-warn · libregistry