You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the module only works in universal mode, because a server middleware is used. A possible solution to make the module work in SPA and generate mode would be the alias/redirect options in the vue-router.
Ignoring this, I have made an implementation based on 'addplugin call in module' approach for a simple path that works in both matching merchanism (a redirect from /abc -> /about) https://codesandbox.io/s/qkxvnmv104
In spa mode the redirection looks working as expected for dev / generated mode, including generating the page for '/abc' by adding it into options.generate.routes
In universal generate mode i encountered a blocker, that the redirection logic by server middleware seems not to be considered so '/abc' is unable to be resolved and generated finally
(while in universal dev mode both 1)a direct visit to '/abc' 2)clicking a router-link for '/abc' work as expected)
I'd appreciate having spa redirect support in the module.
For generate you are right, the serverMiddleware isn't considered at all. Could we apply the idea from the spa version there and leverage the spa fallback mechanism of generate?
Currently, the module only works in
universal mode
, because aserver middleware
is used. A possible solution to make the module work in SPA and generate mode would be thealias/redirect
options in the vue-router.Related: #1
Read more
The text was updated successfully, but these errors were encountered: