Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROUTER]: Vite must be restarted along with browser refresh to pick up new routes #119

Closed
2 tasks
brandonroberts opened this issue Oct 20, 2022 · 1 comment
Closed
2 tasks
Labels
bug Something isn't working

Comments

@brandonroberts
Copy link
Member

Please provide the environment you discovered this bug in.

Local

Which area/package is the issue in?

router

Description

  • When adding a new file for route, it is not picked up on page reload.
  • You must restart Vite, and refresh the page to get the new routes.

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@brandonroberts brandonroberts added the bug Something isn't working label Oct 20, 2022
@brandonroberts
Copy link
Member Author

GitHub repo is here https://github.com/brandonroberts/analog-router-demo

To reproduce:

  1. Clone repo
  2. Run yarn to install dependencies
  3. Run yarn dev
  4. Copy the src/app/routes/about.ts to src/app/routes/test.ts
  5. Try to visit http://127.0.0.1:5173/test
  6. Note the Page Not Found displayed
  7. Stop/Restart the development server
  8. Hard refresh the page in the browser
  9. Try to visit http://127.0.0.1:5173/test
  10. Note the page is displayed

The routes can also be updated by changing an existing file in the src/app/routes folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant