New frontend example for react-router #529
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 evenreact-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 byreact-router
. See their documentation here. I already wrapped thereact-router typegen
command into ajs_run_binary
but I couldn't figure out how to make thets_library
target accept the generated files as input.:test
fails because thevite
library somehow doesn't containexpect
. 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.