feat(wrapComponents): new chain configuration option (#7236)

This commit provides a backward compatible mechanism to chain wrap 
an individual component multiple times

`Chain` mode: allow chaining of plugins on a given component
`Legacy` mode: last plugin to wrap a given component will supercede others

* chore: Add unit test for wrapComponent wrapping

* doc: Add documentation about the new pluginsOptions configuration

* doc: Add a sidenote on plugin-api page

Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
Damien
2021-05-21 00:41:11 +02:00
committed by GitHub
parent 60ac6d24ba
commit 516e666f1c
5 changed files with 99 additions and 11 deletions

View File

@@ -388,6 +388,10 @@ const MyWrapComponentPlugin = function(system) {
}
```
**Note:**
If you have multiple plugins wrapping the same component, you may want to change the [`pluginsOptions.pluginLoadType`](/docs/usage/configuration.md#Plugins-options) parameter to `chain`.
#### `rootInjects`
The `rootInjects` interface allows you to inject values at the top level of the system.