text: var path = require('path')
  var webpack = require('webpack')
  
  module.exports = {
      entry: [
          'babel-polyfill',
          './browser.js'
      ],
      output: {
          path: path.resolve(__dirname, './dist'),
          publicPath: '/dist/',
          filename: 'sdk' + ((process.env.NODE_ENV === 'production') ? '-min' : '') + '.js'
      },
  
      module: {
          rules: [
              {
                  test: /\.js$/,
                  exclude: /node_modules/,
                  use: {
                      loader: 'babel-loader'
                  }
              }
          ]
      }
  }
  
  if (process.env.NODE_ENV === 'production') {
      module.exports.devtool = '#source-map'
      module.exports.plugins = (module.exports.plugins || []).concat([
          new webpack.DefinePlugin({
              'process.env': {
                  NODE_ENV: '"production"'
              }
          }),
          new webpack.optimize.UglifyJsPlugin({
              sourceMap: false,
              compress: {
                  warnings: false
              }
          }),
          new webpack.LoaderOptionsPlugin({
              minimize: true,
              include: /\.min\.js$/,            
          })
      ])
  }