function assertOptionalArray(config, prop) {
  if (config[prop] != null && !Array.isArray(config[prop])) {
    throw createError(`Option ${prop} must be an array`);
  }
}
@param {WcHmrPluginConfig} config
@param {keyof WcHmrPluginConfig} prop