function injectHook(options, name, hook) {
  const existing = options[name]
  options[name] = existing
    ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook]
    : [hook]
}
Inject a hook to a hot reloadable component so that
we can keep track of it.

@param {Object} options
@param {String} name
@param {Function} hook