Fragments#
Fragments are great way to add partial presets for configuration.
Some usecases include:
- Local development preset.
- Quick start configuration.
- Composable snippets of config.
To start using it, add a few fragments and choose a fragment key.
See below for more details.
.addConfigFragment(name, fragment)
#
This option adds a fragment, using the first parameter as its identifier.
.addConfigFragments(fragments)
#
This option adds multiple fragments. For every entry, the key is used as the fragment name and the value being the fragment itself.
.setFragmentKey(key)
#
This option sets the key that defines which fragments get loaded into the configuration. The key can come from any loaders.
The value associated with key is a comma seperated list of fragments to load.