File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import { install } from './install'
4
4
import { START } from './util/route'
5
- import { assert } from './util/warn'
5
+ import { assert , warn } from './util/warn'
6
6
import { inBrowser } from './util/dom'
7
7
import { cleanPath } from './util/path'
8
8
import { createMatcher } from './create-matcher'
@@ -256,6 +256,9 @@ export default class VueRouter {
256
256
}
257
257
258
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
+ }
259
262
this . matcher . addRoutes ( routes )
260
263
if ( this . history . current !== START ) {
261
264
this . history . transitionTo ( this . history . getCurrentLocation ( ) )
You can’t perform that action at this time.
0 commit comments