Knowledge Base
ConfigurationValue typesPluginsSettingsEnvironment VariablesFAB StructurePlugin Runtime RespondersProductionRuntime EnvironmentUnderstanding Assets


FAB builds use a fab.config.json5 file:

// fab.config.json5
plugins: {
'@fab/input-static': {
dir: 'dist', // Read files from this directory
'@fab/serve-html': {
// Enrich HTML files with:
injections: {
env: {
name: 'FAB_SETTINGS', // which global variable to use?
csp: {
nonce: true,
'@fab/rewire-assets': {},
settings: {
production: './production-settings.json',
staging: {
API_URL: 'https://staging.lol.com',

Value types

This file is JSON5, a superset of JSON that's closer to normal JS syntax (i.e. it has comments and unquoted keys). A normal JSON file is valid JSON5, though, if you prefer that, and support for other formats like YAML is planned.

We deviate in one important respect, however, which is that string values of the form `"/regexp/i" are parsed using regex-parser. For reference, the exact regexp we use to test if a value is a regexp (😳) is here.