1
0

development.server.js 653 B

1234567891011121314151617181920
  1. // Note: You must restart bin/webpack-dev-server for changes to take effect
  2. const { resolve } = require('path');
  3. const { env } = require('process');
  4. const merge = require('webpack-merge');
  5. const devConfig = require('./development.js');
  6. const { devServer, publicPath, paths } = require('./configuration.js');
  7. module.exports = merge(devConfig, {
  8. devServer: {
  9. host: env.LOCAL_DOMAIN ? '0.0.0.0' : devServer.host,
  10. port: devServer.port,
  11. headers: { "Access-Control-Allow-Origin": "*" },
  12. compress: true,
  13. historyApiFallback: true,
  14. contentBase: resolve(paths.output, paths.entry),
  15. publicPath,
  16. disableHostCheck: true,
  17. },
  18. });