nhoizey’s avatarnhoizey’s Twitter Archive—№ 116,705

    1. To have different builds for @CloudflareDev Pages previews, I found if-env and the CF_PAGES_BRANCH variable: json { "scripts": { "build": "if-env CF_PAGES_BRANCH=main && npm run main || npm run preview" } } nicolas-hoizey.com/notes/2022/08/03/1/
  1. …in reply to @nhoizey
    @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.