webpack.dev.js 667 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. static: {
  19. directory: "./dist/",
  20. watch: true
  21. },
  22. client: {
  23. webSocketURL: config.get("devServer.webSocketURL")
  24. },
  25. hot: true,
  26. historyApiFallback: true,
  27. port: config.get("devServer.port"),
  28. host: "0.0.0.0",
  29. allowedHosts: "all"
  30. }
  31. });