code: function normalizeBabelPlugins(plugins, file, buildManager) {
      if (typeof plugins === 'function') {
          plugins = plugins(file);
      }
  
      plugins = plugins ? [].concat(plugins) : [];
      if (!hasBabelDepPlugin(plugins)) {
          // add npm resolve plugin
          plugins.push(DEP_PLUGIN_NAME);
      }
  
      return (plugins || []).map(item => {
          if (typeof item === 'string') {
              let result = BUILTIN_PLUGINS[item];
              if (typeof result === 'function') {
                  return result(file, buildManager);
              }
          }
          return item;
      });
  }
docs: Normalize babel plugins
  
  @inner
  @param {Array} plugins the plugins to normalize
  @param {Object} file the file to process
  @param {BuildManager} buildManager the build manager
  @return {Array}