Skip to content

Latest commit

 

History

History
 
 

react-cra

This project was bootstrapped with Create React App. Then Bazel configuration was added in WORKSPACE and BUILD.bazel

See the examples guide for a comparison of the several approaches you can take to build and test your React app with Bazel.

Available Scripts

Just like with stock create-react-app, we have the same developer workflow. In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
Note that it restarts Jest on each change, so there's a large time penalty on each re-run. This can be solved by making Jest ibazel-aware as we did with Karma. See bazel-contrib/rules_nodejs#2028

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.