Open 1415333545 opened 3 years ago
@nuxt/router-extras/lib/extras.js function invalidateRoute (file) { const routes = localRoutes.filter(route => route.component === file) console.log(localRoutes[0].component) // => print like "D:\\hyp-test\\nuxt-test\\pages\\Home.vue" console.log(file) // => print like "D:\hyp-test\nuxt-test\pages\Home.vue" /* istanbul ignore next */ if (!routes.length) { return false }
@nuxt/router-extras/lib/extras.js
function invalidateRoute (file) { const routes = localRoutes.filter(route => route.component === file) console.log(localRoutes[0].component) // => print like "D:\\hyp-test\\nuxt-test\\pages\\Home.vue" console.log(file) // => print like "D:\hyp-test\nuxt-test\pages\Home.vue" /* istanbul ignore next */ if (!routes.length) { return false }
const extras = extractExtrasFromRoute(routes[0], false)
return extras._needUpdate }
// Should need const routes = localRoutes.filter(route => normalize(route.component) === normalize(file))
I encountered the same bug on Windows. I tested your solution and it works. Consider creating a pull request? @1415333545
const extras = extractExtrasFromRoute(routes[0], false)
return extras._needUpdate }
// Should need const routes = localRoutes.filter(route => normalize(route.component) === normalize(file))