mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat(vue-app): upgrade vue-router
to 3.1.x (#6722)
This commit is contained in:
parent
ff34a8a3ed
commit
d83761028e
@ -62,7 +62,7 @@
|
|||||||
"vue-client-only": "^2.0.0",
|
"vue-client-only": "^2.0.0",
|
||||||
"vue-meta": "^2.3.1",
|
"vue-meta": "^2.3.1",
|
||||||
"vue-no-ssr": "^1.1.1",
|
"vue-no-ssr": "^1.1.1",
|
||||||
"vue-router": "~3.0.7",
|
"vue-router": "^3.1.3",
|
||||||
"vuex": "^3.1.2"
|
"vuex": "^3.1.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
"vue-client-only": "^2.0.0",
|
"vue-client-only": "^2.0.0",
|
||||||
"vue-meta": "^2.3.1",
|
"vue-meta": "^2.3.1",
|
||||||
"vue-no-ssr": "^1.1.1",
|
"vue-no-ssr": "^1.1.1",
|
||||||
"vue-router": "~3.0.7",
|
"vue-router": "^3.1.3",
|
||||||
"vue-template-compiler": "^2.6.10",
|
"vue-template-compiler": "^2.6.10",
|
||||||
"vuex": "^3.1.2"
|
"vuex": "^3.1.2"
|
||||||
},
|
},
|
||||||
|
@ -82,6 +82,13 @@ const _routes = recursiveRoutes(router.routes, ' ', _components, 1)
|
|||||||
}
|
}
|
||||||
}).join('\n')%>
|
}).join('\n')%>
|
||||||
|
|
||||||
|
// TODO: remove in Nuxt 3
|
||||||
|
const emptyFn = () => {}
|
||||||
|
const originalPush = Router.prototype.push
|
||||||
|
Router.prototype.push = function push (location, onComplete = emptyFn, onAbort) {
|
||||||
|
return originalPush.call(this, location, onComplete, onAbort)
|
||||||
|
}
|
||||||
|
|
||||||
Vue.use(Router)
|
Vue.use(Router)
|
||||||
|
|
||||||
export const routerOptions = {
|
export const routerOptions = {
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
],
|
],
|
||||||
"ignoreDeps": [
|
"ignoreDeps": [
|
||||||
"core-js",
|
"core-js",
|
||||||
"vue-router",
|
|
||||||
"memory-fs"
|
"memory-fs"
|
||||||
],
|
],
|
||||||
"lockFileMaintenance": {
|
"lockFileMaintenance": {
|
||||||
|
@ -21,7 +21,7 @@ describe('nuxt minimal vue-app bundle size limit', () => {
|
|||||||
const filter = filename => filename === 'vue-app.nuxt.js'
|
const filter = filename => filename === 'vue-app.nuxt.js'
|
||||||
const legacyResourcesSize = await getResourcesSize(distDir, 'client', { filter })
|
const legacyResourcesSize = await getResourcesSize(distDir, 'client', { filter })
|
||||||
|
|
||||||
const LEGACY_JS_RESOURCES_KB_SIZE = 15.2
|
const LEGACY_JS_RESOURCES_KB_SIZE = 15.4
|
||||||
expect(legacyResourcesSize.uncompressed).toBeWithinSize(LEGACY_JS_RESOURCES_KB_SIZE)
|
expect(legacyResourcesSize.uncompressed).toBeWithinSize(LEGACY_JS_RESOURCES_KB_SIZE)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -11820,10 +11820,10 @@ vue-no-ssr@^1.1.1:
|
|||||||
resolved "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz#875f3be6fb0ae41568a837f3ac1a80eaa137b998"
|
resolved "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz#875f3be6fb0ae41568a837f3ac1a80eaa137b998"
|
||||||
integrity sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==
|
integrity sha512-ZMjqRpWabMPqPc7gIrG0Nw6vRf1+itwf0Itft7LbMXs2g3Zs/NFmevjZGN1x7K3Q95GmIjWbQZTVerxiBxI+0g==
|
||||||
|
|
||||||
vue-router@~3.0.7:
|
vue-router@^3.1.3:
|
||||||
version "3.0.7"
|
version "3.1.3"
|
||||||
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.0.7.tgz#b36ca107b4acb8ff5bc4ff824584059c23fcb87b"
|
resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.1.3.tgz#e6b14fabc0c0ee9fda0e2cbbda74b350e28e412b"
|
||||||
integrity sha512-utJ+QR3YlIC/6x6xq17UMXeAfxEvXA0VKD3PiSio7hBOZNusA1jXcbxZxVEfJunLp48oonjTepY8ORoIlRx/EQ==
|
integrity sha512-8iSa4mGNXBjyuSZFCCO4fiKfvzqk+mhL0lnKuGcQtO1eoj8nq3CmbEG8FwK5QqoqwDgsjsf1GDuisDX4cdb/aQ==
|
||||||
|
|
||||||
vue-server-renderer@^2.6.10:
|
vue-server-renderer@^2.6.10:
|
||||||
version "2.6.10"
|
version "2.6.10"
|
||||||
|
Loading…
Reference in New Issue
Block a user