text: import { babel } from "@rollup/plugin-babel"
  import eslint from "@rollup/plugin-eslint"
  import pkg from "./package.json"
  
  const banner = `/*!
  * ${pkg.name} v${pkg.version}
  * (c) ${new Date().getFullYear()} ZhuMin
  * @license MIT
  */`
  
  const baseConfig = {
      root: true,
      input: "./src/entry.js",
      plugins: [
          babel({
              babelHelpers: "runtime"
          }),
          eslint()
      ]
  }
  
  const iifeBundleConfig = {
      output: {
          file: "./lib/bundle.js",
          format: "iife",
          banner
      }
  }
  
  const customConfigs = [
      iifeBundleConfig
  ]
  
  function mergeConfig(customConfig, targetConfig) {
      targetConfig.output = Object.assign({}, customConfig.output)
  
      if (customConfig.plugins) {
          targetConfig.plugins.push(...customConfig.plugins)
      }
  
      return targetConfig
  }
  
  function createConfig() {
      return customConfigs.map(customConfig => {
          return mergeConfig(customConfig, baseConfig)
      })
  }
  
  export default createConfig()