fastify / fastify/help

How can I access another plugin’s registered options inside Fastify?

Open
#1,108 3 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
No language data
Stars
68
Forks
8
Avg merge
11h 2m
Merged PRs (30d)
2

Description

## 💬 Question here

I have a situation where multiple plugins are registered in my Fastify app. Each plugin can receive its own options object when registered, for example:

```js
fastify.register(require('./pluginA'), { foo: 'bar' })
fastify.register(require('./pluginB'))
````
In `pluginB`, I’d like to access the options that were passed to `pluginA`

Is there a built-in or recommended way to access another plugin’s options directly?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.