const { merge } = require('webpack-merge');
const path = require('path');
const common = require('./webpack.common');
const host ="http://172.16.3.119";

module.exports = merge({
  mode: 'development',
  output: {
    filename: 'js/[name]_[hash].js',
    chunkFilename: 'js/[name]_[hash].chunk.js'
  },
  devServer: {
    contentBase: path.join(__dirname, "dist-1.0.0.0"),
    port: 9000,
    historyApiFallback: true,
    open: true,
    proxy: {
      '/api/settle_fl/thd/': {
        target: host,//代理地址，这里设置的地址会代替axios中设置的baseURL
        changeOrigin: true,// 如果接口跨域，需要进行这个参数配置
      },
    }
  }
}, common)