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 22
33import { install } from './install'
44import { START } from './util/route'
5- import { assert } from './util/warn'
5+ import { assert , warn } from './util/warn'
66import { inBrowser } from './util/dom'
77import { cleanPath } from './util/path'
88import { createMatcher } from './create-matcher'
@@ -256,6 +256,9 @@ export default class VueRouter {
256256 }
257257
258258 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+ }
259262 this . matcher . addRoutes ( routes )
260263 if ( this . history . current !== START ) {
261264 this . history . transitionTo ( this . history . getCurrentLocation ( ) )
You can’t perform that action at this time.
0 commit comments