vite-plugin-router-warn
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

vite-plugin-router-warn

A vite plugin in development environment that remove dynamic router refresh warning: No match found for location with path

NPM version

🤔 Origin

Solve issues related to https://github.com/vuejs/router/issues/359
When the author provides the relevant configuration to turn off the warning, vite-plugin-router-warn will no longer be needed.
Only enabled in the development environment, only processes vue-router files and only runs once when the service is started or restarted, with extremely low performance consumption.

vuerouter

🦾 Configurable

configuration must meaning type example
txt No export the modified vue-router file to the project root directory. default false. when true, router.txt is exported. Of course, you can customize the export file name by filling in the string (turn on when comparing files) booleanstring removeNoMatch({ txt: true })

📦 Install

# npm
npm install vite-plugin-router-warn -D

# or yarn
yarn add vite-plugin-router-warn -D

# or pnpm
pnpm add vite-plugin-router-warn -D

📕 Usage

// vite.config.ts

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import removeNoMatch from "vite-plugin-router-warn";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(), removeNoMatch()]
});

License

MIT © 2023-present, xiaoxian521

Package Sidebar

Install

npm i vite-plugin-router-warn

Weekly Downloads

660

Version

1.0.0

License

MIT

Unpacked Size

1.33 MB

Total Files

6

Last publish

Collaborators

  • heshang521