text: const polyfill = []
  
  const umd = {
    entry: polyfill.concat(['./src/index.js']),
    output: {
      path: `${__dirname}/dist`,
      filename: 'index.js',
      library: 'xgplayer-flv',
      libraryTarget: 'umd'
    },
    mode: 'production',
    module: {
      rules: [{
        test: /\.js$/,
        loader: 'babel-loader'
      }, {
        test: /\.scss$/,
        use: [
          'style-loader',
          {
            loader: 'css-loader',
            options: {
              importLoaders: 1,
              minimize: true
            }
          },
          'postcss-loader',
          'sass-loader'
        ]
      }]
    },
    externals: {
      xgplayer: 'xgplayer'
    },
    optimization: {
      minimize: true
    }
  }
  
  const client = {
    entry: polyfill.concat(['./src/index.js']),
    output: {
      path: `${__dirname}/browser`,
      filename: 'xgplayer-flv.js'
    },
    module: {
      rules: [{
        test: /\.js$/,
        loader: 'babel-loader'
      }, {
        test: /\.scss$/,
        use: [
          'style-loader',
          {
            loader: 'css-loader',
            options: {
              importLoaders: 1,
              minimize: true
            }
          },
          'postcss-loader',
          'sass-loader'
        ]
      }]
    },
    externals: {
      xgplayer: 'Player'
    },
    mode: 'production',
    optimization: {
      minimize: true
    }
  }
  
  module.exports = [umd, client]
  