yarn add -D @njzjz/preview-cfpages
Set environment CLOUDFLARE_PAGES_DIST_DIR.
CLOUDFLARE_PAGES_DIST_DIR
Add scripts to package.json.
package.json
"postinstall": "preview-cfpages preview", "cfpages:build": "npm build build",