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

New frontend example for react-router #529

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jimmyt857
Copy link

@jimmyt857 jimmyt857 commented Nov 27, 2024

With the recent merge between React Router and Remix, React Router v7 is a compelling option as a frontend framework and I wanted to try it out. Sending a PR because I thought others might benefit from my attempt at getting this working within Bazel!

Although the dev and production versions of the server are both working, this example is 95% of the way there. Unfortunately I'm not yet deeply familiar with rules_js, rules_ts, or even react-router. I need a bit of help fixing the //react-router/app:app_typecheck and //react-router/app:test tests, they are each failing for a different reason:

  • :app_typecheck fails because it is missing some special typing files generated by react-router. See their documentation here. I already wrapped the react-router typegen command into a js_run_binary but I couldn't figure out how to make the ts_library target accept the generated files as input.
  • :test fails because the vite library somehow doesn't contain expect. Honestly not sure why this is happening, the test code is taken almost exactly from https://github.com/bazelbuild/examples/blob/main/frontend/react/src/App.test.tsx.

@jimmyt857 jimmyt857 requested a review from alexeagle as a code owner November 27, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant