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) => {
|
||||
nuxtApp.hook('app:error', (error) => {
|
||||
if (error.statusCode === 404 && process.client) {
|
||||
error.path = window.location.pathname
|
||||
export default defineNuxtPlugin({
|
||||
name: 'router',
|
||||
enforce: 'pre',
|
||||
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) => {
|
||||
console.error('Vue Error:', error)
|
||||
console.error('Component:', instance)
|
||||
console.error('Info:', info)
|
||||
nuxtApp.hook('vue:error', (error, instance, info) => {
|
||||
console.error('Vue Error:', error)
|
||||
console.error('Component:', instance)
|
||||
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