01964
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
93f08482b7
commit
f94a8cf320
@ -1,19 +1,24 @@
|
|||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin({
|
||||||
nuxtApp.hook('app:error', (error) => {
|
name: 'router',
|
||||||
if (error.statusCode === 404 && process.client) {
|
enforce: 'pre',
|
||||||
error.path = window.location.pathname
|
setup(nuxtApp) {
|
||||||
|
nuxtApp.hook('app:error', (error) => {
|
||||||
|
if (error.statusCode === 404 && process.client) {
|
||||||
|
const basePath = process.env.NODE_ENV === 'production' ? '/containers/matheothierry-portfolio_nuxt' : '/'
|
||||||
|
error.path = window.location.pathname.replace(basePath, '')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
|
||||||
|
console.error('Vue Error:', error)
|
||||||
|
console.error('Component:', instance)
|
||||||
|
console.error('Info:', info)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
|
||||||
nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
|
nuxtApp.hook('vue:error', (error, instance, info) => {
|
||||||
console.error('Vue Error:', error)
|
console.error('Vue Error:', error)
|
||||||
console.error('Component:', instance)
|
console.error('Component:', instance)
|
||||||
console.error('Info:', info)
|
console.error('Info:', info)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
nuxtApp.hook('vue:error', (error, instance, info) => {
|
|
||||||
console.error('Vue Error:', error)
|
|
||||||
console.error('Component:', instance)
|
|
||||||
console.error('Info:', info)
|
|
||||||
})
|
|
||||||
})
|
})
|
Loading…
Reference in new issue