- Clone this repo.
git clone https://github.com/silvia-odwyer/photon- Install the demo dependencies.
cd react_app_demo
npm install- Start a development server at localhost:5173.
npm run devVite will open the app in your browser and hot-reload when you edit sources.
- Build an optimised production bundle.
npm run buildUse npm run preview to verify the build locally, or npm run lint to run TypeScript in no-emit mode.
Want to test against a locally compiled Photon crate? Run
wasm-pack buildinsidecrate/and point the demo at the generatedcrate/pkgoutput (e.g. vianpm link).
This project is bootstrapped with Vite and React 19 with TypeScript. The Photon WebAssembly package is loaded directly from npm and initialised before the UI becomes interactive.
In the project directory, you can run:
Runs the app in development mode at http://localhost:5173 with hot module replacement.
Generates a production-ready bundle in dist/ and runs the TypeScript compiler as part of the build pipeline.
Serves the production bundle locally so you can sanity-check the optimised output.
Type-checks the project (tsc --noEmit) without writing any build artifacts.