Jump to main content

Nicolas Hoizey

  • articles
  • billets
  • links
  • notes
  • talks
  • archives
  • about

Note from 3 August 2022

  • Nicolas Hoizey
  • 3 August 2022
  • Cloudflare, npm

To have different builds for #Cloudflare Pages previews, I found if-env and the CF_PAGES_BRANCH variable:

{
  "scripts": {
    "build": "if-env CF_PAGES_BRANCH=main && npm run main || npm run preview"
  }
}

0 reaction

  • Older: Note from 1 August 2022
  • Newer: Note from 5 August 2022

If you want to share an error or suggest an enhancement of this content, please edit the source on GitHub.

© Nicolas Hoizey

Built with Eleventy