mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
refactor(vue-app): simplify mount error log (#5826)
* separately log mount error in dev mode * simplify mount exception Co-authored-by: Xin Du (Clark) <clark.duxin@gmail.com>
This commit is contained in:
parent
0d5b49dcbc
commit
2e41bb47b5
@ -90,13 +90,7 @@ Vue.config.$nuxt.<%= globals.nuxt %> = true
|
||||
const errorHandler = Vue.config.errorHandler || console.error
|
||||
|
||||
// Create and mount App
|
||||
createApp()
|
||||
.then(mountApp)
|
||||
.catch((err) => {
|
||||
const wrapperError = new Error(err)
|
||||
wrapperError.message = '[nuxt] Error while mounting app: ' + wrapperError.message
|
||||
errorHandler(wrapperError)
|
||||
})
|
||||
createApp().then(mountApp).catch(errorHandler)
|
||||
|
||||
function componentOption(component, key, ...args) {
|
||||
if (!component || !component.options || !component.options[key]) {
|
||||
@ -488,7 +482,7 @@ function showNextPage(to) {
|
||||
// Will not update the instance data, so we have to update $data ourselves
|
||||
function fixPrepatch(to, ___) {
|
||||
if (this._pathChanged === false && this._queryChanged === false) return
|
||||
|
||||
|
||||
const matches = []
|
||||
const instances = getMatchedComponentsInstances(to, matches)
|
||||
const Components = getMatchedComponents(to, matches)
|
||||
|
Loading…
Reference in New Issue
Block a user