Skip to content

Commit 0964036

Browse files
committed
Add version variable to VueRouter
Fixes vuejs#978 Closes vuejs#979
1 parent c6a22fd commit 0964036

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

build/build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ function genConfig (opts) {
6666
flow(),
6767
node(),
6868
cjs(),
69+
replace({
70+
__VERSION__: version
71+
}),
6972
buble()
7073
]
7174
}

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ function createHref (base: string, fullPath: string, mode) {
155155
}
156156

157157
VueRouter.install = install
158+
VueRouter.version = '__VERSION__'
158159

159160
if (inBrowser && window.Vue) {
160161
window.Vue.use(VueRouter)

0 commit comments

Comments
 (0)