docs: function getWebpackConfig(config, context) {
    var webpackConfig = {
      module: {
        rules: [
          {
            exclude: /node_modules/,
            loader: assist.resolve('settle-loader'),
            test: /\.(es6|jsx)$/,
            options: {
              stub: config.holder.stub,
              link: 'react-dom'
            }
          },
          {
            exclude: /node_modules/,
            loader: assist.resolve('babel-loader'),
            test: /\.(es6|js|jsx)$/
          }
        ]
      },
      output: {
        path: config.$path.target.client,
        filename: '[name].js'
      },
      resolve: {
        extensions: ['.js', '.jsx'],
        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
  
    if (config.extern) {
      config.extern = assist.arrayify(config.extern)
      if (config.extern.indexOf('react') >= 0) {
        webpackConfig.externals['react'] = 'React'
        webpackConfig.externals['react-dom'] = 'ReactDOM'
      }
    }
  
    if (!webpackConfig.externals['react']) {
      webpackConfig.module.rules.push({
        test: require.resolve('react'),
        use: [{ loader: 'expose-loader', options: 'React' }]
      },{
        test: require.resolve('react-dom'),
        use: [{ loader: 'expose-loader', options: 'ReactDOM' }]
      })
    }
  
    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
  }