-
To have different builds for @CloudflareDev Pages previews, I found
if-envand theCF_PAGES_BRANCHvariable:json { "scripts": { "build": "if-env CF_PAGES_BRANCH=main && npm run main || npm run preview" } }nicolas-hoizey.com/notes/2022/08/03/1/ -
@CloudflareDev Preview builds are here to make sure everything is working as expected, so should be the same as production ones. BUT, sometimes I need some little differences. 🤷♂️ For example, I don't want to update my @algolia index with content only available on the preview.