webpack.dev.js 670 B

1234567891011121314151617181920212223242526272829303132
  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. styles: "src/styles",
  14. vue: "vue/dist/vue.esm-bundler.js"
  15. }
  16. },
  17. devServer: {
  18. contentBase: "./dist/",
  19. historyApiFallback: true,
  20. hot: true,
  21. port: config.get("frontendPort"),
  22. public: config.get("frontendDomain"),
  23. host: "0.0.0.0",
  24. watchOptions: {
  25. aggregateTimeout: 300,
  26. poll: 1000
  27. },
  28. disableHostCheck: true
  29. }
  30. });