groupPluginsByType(plugins) {
      if (Array.isArray(plugins)) {
        plugins = plugins.reduce(function (memo, plugin) {
          memo[plugin.type] || (memo[plugin.type] = [])
          memo[plugin.type].push(plugin)
          return memo
        }, {})
      }
      return plugins
    }
groups by type the external plugins that were passed through `options.plugins` it they're on a flat array
@method addExternalPlugins
@private
@param {Object} an config object or an array of plugins
@return {Object} plugins the config object with the plugins separated by type