hemerajs/hapi-hemera

Plugins do not allow you to specify config options

sberryman opened this issue · 1 comments

https://github.com/hemerajs/hapi-hemera/blob/master/lib/index.js#L22-L26

  if (options.plugins) {
    options.plugins.forEach((plugin) => {
      hemera.use(plugin)
    })
  }

My proposal is to check plugin type to see if it is an object and that object has a plugin attribute which is either a function or string and optionally options attribute which will be passed as is to hemera.use. If that check doesn't pass it will continue on with the current functionality so it doesn't introduce any breaking changes.

Thoughts?

Fixed with release 1.0.6 75b5a8a