webpack.development.js 827 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //开发环境配置
  2. const HtmlWebpackPlugin = require('html-webpack-plugin');
  3. // vue-loader15.*之后的版本都必须要加上这个,否则会报错
  4. const VueLoaderPlugin = require('vue-loader/lib/plugin');
  5. module.exports = {
  6. mode: 'development',
  7. output: {
  8. filename: 'bundle.js'
  9. },
  10. devtool: 'source-map',
  11. plugins: [
  12. new HtmlWebpackPlugin({
  13. template: 'index.html',
  14. BASE_URL:'src/U/'
  15. }),
  16. new VueLoaderPlugin()
  17. ],
  18. devServer: {
  19. index: "index.html", //默认文件名
  20. hot: true, //热更新
  21. host: "0.0.0.0",
  22. compress: true,
  23. port: 8000,
  24. disableHostCheck: true,
  25. proxy: {
  26. "/mtsy": {
  27. // target: 'http://172.16.90.238:21008',
  28. // target: 'http://172.16.90.64:21009',
  29. target: 'http://172.16.90.77:21008',
  30. pathRewrite: {
  31. "^/mtsy": ""
  32. },
  33. changeOrigin: true
  34. }
  35. }
  36. }
  37. }