const webpack = require("webpack");
const HTMLPlugin = require("html-webpack-plugin");

const isDev = process.env.NODE_ENV === "development";

module.exports = {
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoEmitOnErrorsPlugin(),
    new HTMLPlugin()
  ],
  devServer: {
    port: 5000,
    open: true, //启动webpack-dev-server时自动打开浏览器
    hot: true,
    contentBase: "src",
    proxy: {
      "/zs-web": {
        target: "http://192.168.100.250:8087/",
        //target: "http://192.168.51.199:8088",
        changeOrigin: true,
        secure: false,
        ws: true
      }
    }
  }
};
