Bin
2025-12-16 971a2a12c03b74dd2d7d668b9dbc599f5131bcaf
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();