Skip to main content

Part 7: Configure for Deployment - Preparing for Launch

· One min read
Mike Stabile
AI Integration Specialist & Developer

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 url to your production domain
  • Change onBrokenLinks to 'throw'
  • Use customFields for environment variables

The Deployment Checklist

  • URL matches production domain
  • npm run build succeeds locally
  • npm run serve shows correct behavior
  • All images and assets load correctly

Next: Part 8 - Test & Verify: Trust But Verify