Part 7: Configure for Deployment - Preparing for Launch
· One min read
Building something and shipping something are two entirely different skills.
The Build System
npm run build produces a build/ directory with static HTML, CSS, and JavaScript.
Cloudflare Pages Setup
Create wrangler.toml:
name = "your-project-name"
pages_build_output_dir = "build"
[build]
command = "npm run build"
Configuration for Production
- Set
urlto your production domain - Change
onBrokenLinksto'throw' - Use
customFieldsfor environment variables
The Deployment Checklist
- URL matches production domain
-
npm run buildsucceeds locally -
npm run serveshows correct behavior - All images and assets load correctly
