2026-03-27 01:36:18 +00:00
|
|
|
module Config where
|
|
|
|
|
|
|
|
|
|
import IHP.Prelude
|
|
|
|
|
import IHP.Environment
|
|
|
|
|
import IHP.FrameworkConfig
|
2026-03-29 21:17:43 +00:00
|
|
|
import System.Environment (lookupEnv)
|
|
|
|
|
|
|
|
|
|
-- | Feature flag: set IHP_ANNOTATION_LAUNCHER=true to inject the JS launcher.
|
|
|
|
|
newtype AnnotationLauncherEnabled = AnnotationLauncherEnabled Bool deriving (Typeable)
|
2026-03-27 01:36:18 +00:00
|
|
|
|
|
|
|
|
config :: ConfigBuilder
|
|
|
|
|
config = do
|
2026-03-29 21:17:43 +00:00
|
|
|
launcherEnv <- liftIO (lookupEnv "IHP_ANNOTATION_LAUNCHER")
|
|
|
|
|
option (AnnotationLauncherEnabled (launcherEnv == Just "true"))
|
|
|
|
|
pure ()
|