A React + TypeScript app bundled as a single file and deployed to Google Apps Script using clasp.
- React 19 — UI framework
- Vite — build tool with
vite-plugin-singlefileto inline all assets into one HTML file - vite-plugin-google-apps-script — GAS-compatible build output
- clasp — CLI to push code to Google Apps Script
- TypeScript
app-script/ # GAS project files (pushed to Google)
src/ # React source code
-
Install dependencies:
pnpm install
-
Authenticate with Google:
npx clasp login
-
Clone an existing GAS project (or create one at script.google.com first):
npx clasp clone PROJECT_ID --rootDir ./app-script
pnpm devBuild the React app into app-script/:
pnpm buildPush to Google Apps Script:
npx clasp pushhttps://script.google.com/macros/s/AKfycby_9iwf45mA-AVPhS5r2pQQ8FFcIi4SRAUWrI99XZNe/dev