Bin
2025-12-17 d616898802dfe7e5dd648bcf53c6d1f86b6d3642
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();