function applyEntry (context, entry, compiler) {
  if (typeof entry === 'string' || Array.isArray(entry)) {
    itemToPlugin(context, entry, 'main').apply(compiler);
  } else if (typeof entry === 'object') {
    Object.keys(entry).forEach(name => {
      itemToPlugin(context, entry[name], name).apply(compiler);
    });
  }
}
Handle "object", "string" and "array" types of entry