vuejs/vue-router ? reverse-engineered prompt
Reverse engineered prompt
Build me the official router for a Vue 2 app, so I can define pages with clean URLs and move between them without reloading the whole site.
I want it to support nested routes, dynamic route params, redirects, and navigation guards, plus simple integration with Vue components like links and route views. It should work well in both history style and hash style routing, and handle browser back and forward buttons properly.
Please include a small demo app and clear docs so I can see how to set it up and use it. Add tests for the main routing behavior, and make sure the build produces the distributable files too. If you need to check anything uncertain, look up the current docs online first.
Are you gonna build this?
make sure you review the code using coderabbit