code: function getWebpackConfig(config, context) {
    var webpackConfig = {
      module: {
        rules: [
          {
            exclude: /node_modules/,
            loader: assist.resolve('babel-loader'),
            test: /\.(es6|js)$/
          }
        ]
      },
      output: {
        path: config.$path.target.client,
        filename: '[name].js'
      },
      resolve: {
        extensions: ['.js'],
        alias: config.alias || {}
      },
      externals: {}
    }
  
    var babelConfig = assist.getBabelConfig(context.env)
    var babelLoader = webpackConfig.module.rules
      .find(rule => rule.loader && /babel/.test(rule.loader))
    babelLoader.options = babelConfig
  
    var processEnv = {
      'process.env': {
        NODE_ENV: JSON.stringify(context.env || 'production'),
        IS_BROWSER: true
      }
    }
    if (context.env === 'development') {
      // development env
      webpackConfig.plugins = [
        new webpack.DefinePlugin(processEnv)
      ]
    } else {
      // production env
      webpackConfig.plugins = [
        new webpack.DefinePlugin(processEnv),
        new webpack.optimize.CommonsChunkPlugin({ name: 'common' }),
        new webpack.optimize.UglifyJsPlugin({ sourceMap: false })
      ]
    }
  
    return webpackConfig
  }
docs: get webpack config
  
  @param  {Object} config
  @param  {Object} context
  @return {Object} result - webpack config