This Vite React example shows the intended Infrastructure on Rails workflow:
import { documents } from "rails";The import is the configuration. The Vite plugin in vite.config.ts discovers
that import during dev and build, then writes .rails/infrastructure.ts.
From this directory:
npm install
npm run devOr build it:
npm run buildThe app calls documents.fileNames() in src/App.tsx. After Vite touches that
file, Rails generates .rails/infrastructure.ts.