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
I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
Introduce an option encapsulate?: boolean. Defaults to false. When set to true, keep the plugin encapsulated.
Motivation
fastify-plugin currently makes all plugins accessible by setting skip-override. It would be nice to have an option to keep it encapsulated, so you can set a plugin's name, metadata, etc without affecting the plugin's scope.
I think it is a good suggestion, but I suspect that something will not work (such as the name option) - so we will need a good test suite to cover the use cases
I do not get what's you mean by name option would not works?
The name doesn't matter if it is encapsulated or not. It will be pushed to the registered list and plugin chain in any case.
Prerequisites
🚀 Feature Proposal
Introduce an option
encapsulate?: boolean
. Defaults tofalse
. When set totrue
, keep the plugin encapsulated.Motivation
fastify-plugin
currently makes all plugins accessible by settingskip-override
. It would be nice to have an option to keep it encapsulated, so you can set a plugin's name, metadata, etc without affecting the plugin's scope.Would you consider a PR for this?
Example
The text was updated successfully, but these errors were encountered: