{"size": 1155, "ext": "js", "max_stars_repo_path": "buildH5/webpack.devH5.conf.js", "max_stars_repo_name": "zz570557024/vue-mpvue-ChatRobot", "max_stars_repo_stars_event_min_datetime": "2018-05-29T02:58:50.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-23T07:04:58.000Z", "max_issues_repo_path": "buildH5/webpack.devH5.conf.js", "max_issues_repo_name": "cqkgit/mpvue-weapp-h5", "max_issues_repo_issues_event_min_datetime": "2018-06-04T11:54:29.000Z", "max_issues_repo_issues_event_max_datetime": "2018-08-16T05:09:11.000Z", "max_forks_repo_path": "buildH5/webpack.devH5.conf.js", "max_forks_repo_name": "cqkgit/mpvue-weapp-h5", "max_forks_repo_forks_event_min_datetime": "2018-06-01T04:07:19.000Z", "max_forks_repo_forks_event_max_datetime": "2021-07-12T08:54:30.000Z"}
{"max_stars_count": 314, "max_issues_count": 5, "max_forks_count": 75, "avg_line_length": 31.2162162162, "max_line_length": 68, "alphanum_fraction": 0.658008658}
//const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const config = require('../configH5');
const baseWebpackConfig = require('./webpack.baseH5.conf');
const HtmlWebpackPlugin = require('html-webpack-plugin');
//const CleanWebpackPlugin = require('clean-webpack-plugin');
// const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
// const ExtractTextPlugin = require('extract-text-webpack-plugin')

module.exports = merge(baseWebpackConfig, {
  devtool: 'inline-source-map', //'source-map'
  devServer: {
    contentBase: './dist',
    port: config.dev.port,
    host: config.dev.host,
    publicPath: config.dev.assetsPublicPath,
    proxy: config.dev.proxyTable
  },
  plugins: [
    new webpack.DefinePlugin(config.systemEnv()),
    new webpack.optimize.CommonsChunkPlugin({
      name: 'vendor',
      minChunks: Infinity
    }),
    new webpack.optimize.CommonsChunkPlugin({
      name: 'manifest',
      minChunks: Infinity
    }),
    new HtmlWebpackPlugin({
      filename: 'index.html',
      template: 'index.html',
      inject: true
    })
  ]
});
