Prebuild transformations to codebase?

Hey all, due to some bundling issues with preview pages (pages that pull live from a cms) components are 'leaking' through to the client side when they shouldnt. Now as a temporary fix im going to make a branch with the preview logic and the production branch with the preview logic commented out. Instead of manually doing this, is there some sort of node package that's recommended to transform my pages.tsx and "uncomment" the preview logic based on what branch its building from i.e. NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF? Any advice/ideas are welcome!
0 Replies
No replies yetBe the first to reply to this messageJoin