Closed sedubois closed 7 years ago
.match()
is an internal function that matches a string against all registered patterns, in the case of a catch-all route this is expected behavior for that function.
If you use routes.getRequestHandler(app)
like documented in the readme, that path won't match. It first checks against routes.isNextPath()
and skips if positive. Please check how it's implemented here. You can use it in a similar way for the caching example.
With 1.0.15:
routes.js
:This code:
(among other things) returns the log below:
/:slug
matches on__webpack_hmr
, which it shouldn't.Also not sure if it does or not, but should also ensure it won't match on /favicon.ico either.