We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92395d4 commit 2e41445Copy full SHA for 2e41445
src/index.js
@@ -2,7 +2,7 @@
2
3
import { install } from './install'
4
import { START } from './util/route'
5
-import { assert } from './util/warn'
+import { assert, warn } from './util/warn'
6
import { inBrowser } from './util/dom'
7
import { cleanPath } from './util/path'
8
import { createMatcher } from './create-matcher'
@@ -256,6 +256,9 @@ export default class VueRouter {
256
}
257
258
addRoutes (routes: Array<RouteConfig>) {
259
+ if (process.env.NODE_ENV !== 'production') {
260
+ warn(false, 'router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.')
261
+ }
262
this.matcher.addRoutes(routes)
263
if (this.history.current !== START) {
264
this.history.transitionTo(this.history.getCurrentLocation())
0 commit comments