How to change the feature flag provider to Hypertune.
.env
file to the feature-flags
package with the following contents:
keys.ts
file in the feature-flags
packageNEXT_PUBLIC_HYPERTUNE_TOKEN
environment variable in the call to createEnv
:
create-flag.ts
file.
Then, uninstall the existing dependencies from the feature-flags
package:
analyze
and build
scripts to the package.json
file for the feature-flags
package, which both execute the hypertune
command:
getHypertune.ts
file in the feature-flags
package which defines a getHypertune
function that returns an initialized instance of the Hypertune SDK on the server:
index.ts
flags
package. To export them the same way as before, update the index.ts
file to export everything from the generated/hypertune.vercel.ts
file:
Flag
suffix to all these generated feature flag functions, so you will need to update flag usages with this, e.g. showBetaFeature
=> showBetaFeatureFlag
.