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
Rsbuild's [plugins](/config/plugins) config supports passing a nested array, which means you can reference and register other Rsbuild plugins within your plugin.
171
+
172
+
For example, register `pluginBar` within `pluginFoo`:
173
+
174
+
```ts
175
+
import { pluginBar } from'rsbuild-plugin-bar';
176
+
177
+
exportconst pluginFoo = ():RsbuildPlugin=> {
178
+
const foo = {
179
+
name: 'plugin-foo',
180
+
setup(api) {
181
+
// ...
182
+
},
183
+
};
184
+
return [foo, pluginBar()];
185
+
};
186
+
```
187
+
168
188
## Lifetime Hooks
169
189
170
190
Rsbuild uses lifetime planning work internally, and plugins can also register hooks to take part in any stage of the workflow and implement their own features.
0 commit comments