Bin
2025-12-17 7c6dc86b52527ce8c7c7ed0aebe48d677972a5b1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Get the feature flags from the root feature_flags.json file
import rawFeatureFlags from "../../../../../label_studio/feature_flags.json";
 
// Embed the feature flags in the playground app
const embedFeatureFlags = () => {
  // @ts-ignore
  window.FEATURE_FLAGS = window.FEATURE_FLAGS ?? {};
  const featureFlags = JSON.parse(JSON.stringify(rawFeatureFlags));
 
  for (const flag of Object.values(featureFlags.flags)) {
    // @ts-ignore
    window.FEATURE_FLAGS[flag.key] = flag.on;
  }
};
 
embedFeatureFlags();