@nuxt/vue-app
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -6,2 +6,20 @@ # Change Log | ||
# [2.6.0](https://github.com/nuxt/nuxt.js/compare/v2.5.1...v2.6.0) (2019-04-04) | ||
### Bug Fixes | ||
* **vue-app:** decode uri in `getlocation` ([#5337](https://github.com/nuxt/nuxt.js/issues/5337)) ([77dcfe6](https://github.com/nuxt/nuxt.js/commit/77dcfe6)) | ||
* **vue-app:** prevent mounting page twice on redirect ([#5361](https://github.com/nuxt/nuxt.js/issues/5361)) ([2d73e8a](https://github.com/nuxt/nuxt.js/commit/2d73e8a)) | ||
* fail in case of missing core-js dependency ([#5342](https://github.com/nuxt/nuxt.js/issues/5342)) ([439b914](https://github.com/nuxt/nuxt.js/commit/439b914)) | ||
### Features | ||
* **babel-preset-app:** support specifying core-js version ([#5411](https://github.com/nuxt/nuxt.js/issues/5411)) ([159123f](https://github.com/nuxt/nuxt.js/commit/159123f)) | ||
## [2.5.1](https://github.com/nuxt/nuxt.js/compare/v2.5.0...v2.5.1) (2019-03-21) | ||
@@ -8,0 +26,0 @@ |
/*! | ||
* @nuxt/vue-app v2.5.1 (c) 2016-2019 | ||
* @nuxt/vue-app v2.6.0 (c) 2016-2019 | ||
@@ -20,3 +20,3 @@ * - All the amazing contributors | ||
vue: "^2.6.10", | ||
"vue-meta": "^1.5.8", | ||
"vue-meta": "^1.6.0", | ||
"vue-no-ssr": "^1.1.1", | ||
@@ -23,0 +23,0 @@ "vue-router": "^3.0.2", |
{ | ||
"name": "@nuxt/vue-app", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"repository": "nuxt/nuxt.js", | ||
@@ -18,3 +18,3 @@ "license": "MIT", | ||
"vue": "^2.6.10", | ||
"vue-meta": "^1.5.8", | ||
"vue-meta": "^1.6.0", | ||
"vue-no-ssr": "^1.1.1", | ||
@@ -21,0 +21,0 @@ "vue-router": "^3.0.2", |
@@ -652,2 +652,6 @@ import Vue from 'vue' | ||
// Add afterEach router hooks | ||
router.afterEach(normalizeComponents) | ||
router.afterEach(fixPrepatch.bind(_app)) | ||
// Listen for first Vue update | ||
@@ -675,7 +679,5 @@ Vue.nextTick(() => { | ||
// Add router hooks | ||
// Add beforeEach router hooks | ||
router.beforeEach(loadAsyncComponents.bind(_app)) | ||
router.beforeEach(render.bind(_app)) | ||
router.afterEach(normalizeComponents) | ||
router.afterEach(fixPrepatch.bind(_app)) | ||
@@ -689,18 +691,28 @@ // If page already is server rendered | ||
// First render on client-side | ||
const clientFirstMount = () => { | ||
normalizeComponents(router.currentRoute, router.currentRoute) | ||
showNextPage.call(_app, router.currentRoute) | ||
// Don't call fixPrepatch.call(_app, router.currentRoute, router.currentRoute) since it's first render | ||
mount() | ||
} | ||
render.call(_app, router.currentRoute, router.currentRoute, (path) => { | ||
// If not redirected | ||
if (!path) { | ||
normalizeComponents(router.currentRoute, router.currentRoute) | ||
showNextPage.call(_app, router.currentRoute) | ||
// Don't call fixPrepatch.call(_app, router.currentRoute, router.currentRoute) since it's first render | ||
mount() | ||
clientFirstMount() | ||
return | ||
} | ||
// Push the path and then mount app | ||
router.push(path, () => mount(), (err) => { | ||
if (!err) return mount() | ||
errorHandler(err) | ||
// Add a one-time afterEach hook to | ||
// mount the app wait for redirect and route gets resolved | ||
const unregisterHook = router.afterEach((to, from) => { | ||
unregisterHook() | ||
clientFirstMount() | ||
}) | ||
// Push the path and let route to be resolved | ||
router.push(path, undefined, (err) => { | ||
if (err) errorHandler(err) | ||
}) | ||
}) | ||
} |
@@ -262,3 +262,3 @@ import Vue from 'vue' | ||
export function getLocation(base, mode) { | ||
let path = window.location.pathname | ||
let path = decodeURI(window.location.pathname) | ||
if (mode === 'hash') { | ||
@@ -270,3 +270,3 @@ return window.location.hash.replace(/^#\//, '') | ||
} | ||
return decodeURI(path || '/') + window.location.search + window.location.hash | ||
return (path || '/') + window.location.search + window.location.hash | ||
} | ||
@@ -273,0 +273,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138784
2516
Updatedvue-meta@^1.6.0