This document defines practical defaults for compiler/runtime configuration.
- Compiler defaults prioritize DX and correctness.
- Runtime defaults prioritize DX in development and performance in production.
Current @fictjs/compiler defaults:
fineGrainedDom: truelazyConditional: truegetterCache: trueoptimize: trueoptimizeLevel: 'safe'inlineDerivedMemos: truestrictGuarantee: trueNODE_ENV=productionforce-enablesstrictGuaranteeeven when options request opt-outstrictReactivity: falsedev: false
Set dev: true to attach authored source labels to signal, memo, and effect
DevTools registrations. Set lazyConditional: false to preserve authored
control-flow returns instead of installing runtime branch bindings. Because that
also removes the reactive return re-execution capability, such returns report
FICT-R006 and fail closed under strictGuarantee; use the option with
strictGuarantee: false only in a non-production fallback build. getterCache
caches repeated signal/accessor reads only inside safe synchronous callbacks; set
it to false to emit every read directly. optimizeLevel: 'full' opts into
constant propagation and legacy algebraic identities; the default 'safe'
profile leaves authored algebra alone. inlineDerivedMemos: false preserves
user-named single-use derived memos; compiler-generated __* temporaries can
still be inlined. User-named derived values in hooks are always preserved.
Official bundler integrations keep module metadata in their graph and consume
versioned metadata published by third-party packages. The 0.31 compiler does not
write source-adjacent or .fict-cache/metadata sidecars.
{
sourcemap: true,
dev: true,
strictGuarantee: true,
strictReactivity: false,
}{
sourcemap: true,
strictGuarantee: true,
strictReactivity: true,
}And force strict mode globally in CI:
FICT_STRICT_GUARANTEE=1{
dev: false,
sourcemap: false, // or hidden/external, per deployment policy
strictGuarantee: true,
strictReactivity: false,
}Cycle protection defaults:
- Development: enabled (
NODE_ENV !== 'production') - Production: disabled (
NODE_ENV === 'production')
Optional runtime tuning:
import { setCycleProtectionOptions } from 'fict/advanced'
// Dev/soak test strict mode
setCycleProtectionOptions({
enabled: true,
devMode: true,
})
// Production performance-first (default behavior)
setCycleProtectionOptions({
enabled: false,
})For option details, see docs/cycle-protection.md.