webpack.dev.js 629 B

12345678910111213141516171819202122232425262728293031
  1. process.env.NODE_CONFIG_DIR = `${__dirname}/dist/config/`;
  2. const config = require("config");
  3. const merge = require("webpack-merge");
  4. const common = require("./webpack.common.js");
  5. module.exports = merge(common, {
  6. mode: "development",
  7. devtool: "inline-source-map",
  8. output: {
  9. publicPath: "/"
  10. },
  11. resolve: {
  12. alias: {
  13. vue: "vue/dist/vue.js"
  14. }
  15. },
  16. devServer: {
  17. contentBase: "./dist/",
  18. historyApiFallback: true,
  19. hot: true,
  20. port: config.get("frontendPort"),
  21. public: config.get("frontendDomain"),
  22. watchOptions: {
  23. aggregateTimeout: 300,
  24. poll: 1000
  25. },
  26. host: "0.0.0.0",
  27. disableHostCheck: true
  28. }
  29. });