Simple tic-tac-toe to learn react.js fundamentals from the official docs.
Before you begin, ensure you have the following installed globally:
- Vite+ CLI (
vp) — the unified toolchain entry point
1. Install dependencies:
vp install2. Start the development server:
vp devThe dev server starts at http://localhost:5173 with HMR enabled.
| Command | Description |
|---|---|
vp install |
Install dependencies using the detected package manager (Bun) |
vp dev |
Start the Vite development server with HMR |
vp build |
Build for production (output to dist/) |
vp preview |
Preview the production build locally |
vp lint |
Run Oxlint across the project |
vp check |
Run format, lint, and type checks in one pass |
Important
vp build, vp test, and vp dev are built-in commands and cannot be overridden. To run a package.json script of the same name, use vp run <script> instead.
This project uses Vite+ as the unified frontend toolchain. A single vite.config.js configures the entire development lifecycle:
| Concern | Tool |
|---|---|
| Dev server + HMR | Vite 8 + @vitejs/plugin-react |
| Bundling | Rolldown (Rust-native) |
| Linting | Oxlint with React rules |
| Formatting | Oxfmt |
| Staged checks | vp check --fix on commit |
| Package manager | Bun (via devEngines) |
| Runtime | Node.js (managed by vp env) |
Two official React transform plugins are available — this project uses the default Oxc-based one:
@vitejs/plugin-react— uses Oxc (default)@vitejs/plugin-react-swc— uses SWC
-
React Compiler The React Compiler is not enabled in this template due to its impact on dev and build performance. To add it, see the React Compiler installation guide.
-
Expanding Oxlint configuration For production applications, consider migrating to TypeScript to enable type-aware lint rules. See the TS template for reference.
-
Bun as runtime Bun is used here as the package manager only.
vpmanages a Node.js runtime for toolchain execution. Direct Bun runtime support withvpis not yet available — see issue comment. -
Tutorial code drift The following code here does not look exactly the same as what you'll find in the official tutorial docs. I've made some minor opinionated changes that seem better for me. The behavior is the same however. This repo will also include the extra game features outlined in the tutorial's Wrapping up section.