-
-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
good first issueGood for newcomersGood for newcomerssemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minor
Description
Prerequisites
- I have written a descriptive issue title
- 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.
Would you consider a PR for this?
Example
module.exports = fp(plugin, {
fastify: '4.x',
decorators: {
fastify: ['plugin1', 'plugin2'],
reply: ['compress']
},
dependencies: ['plugin1-name', 'plugin2-name'],
encapsulate: true,
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerssemver-minorIssue or PR that should land as semver minorIssue or PR that should land as semver minor