You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configuration files live in `config/defaults/`. The `development.js`file is the base; other files in that folder override it.
117
+
Configuration is split between a **global**file and **per-module** files, then merged at startup into a single config object.
118
118
119
-
Environment variables prefixed with `DEVKIT_NODE_` are merged on top. The variable path maps directly to the config object key:
119
+
### File layout
120
+
121
+
Only `config.*.js` files participate in the merge. Other config files in module directories (e.g. policy, seed) are loaded separately by their own init logic.
| 4 | Global env overrides |`config/defaults/config.<env>.js`|
142
+
| 5 |`DEVKIT_NODE_*` env vars |`DEVKIT_NODE_app_title='my app'`|
143
+
144
+
Layers 3–4 are only applied when `NODE_ENV` is not `development`.
145
+
146
+
### Merge semantics
147
+
148
+
-**Objects** are merged recursively — keys from higher layers override lower layers, unmentioned keys are preserved.
149
+
-**Arrays are replaced entirely** — a higher-priority layer defining a 2-item array replaces a 4-item array from a lower layer. Items are never merged by index.
150
+
-**`undefined` values** are skipped — they do not overwrite existing keys.
0 commit comments