You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.0 KiB

  1. // Note: You must restart bin/webpack-dev-server for changes to take effect
  2. const merge = require('webpack-merge');
  3. const sharedConfig = require('./shared.js');
  4. const { settings, output } = require('./configuration.js');
  5. const watchOptions = {
  6. ignored: /node_modules/,
  7. };
  8. if (process.env.VAGRANT) {
  9. // If we are in Vagrant, we can't rely on inotify to update us with changed
  10. // files, so we must poll instead. Here, we poll every second to see if
  11. // anything has changed.
  12. watchOptions.poll = 1000;
  13. }
  14. module.exports = merge(sharedConfig, {
  15. devtool: 'cheap-module-eval-source-map',
  16. stats: {
  17. errorDetails: true,
  18. },
  19. output: {
  20. pathinfo: true,
  21. },
  22. devServer: {
  23. clientLogLevel: 'none',
  24. https: settings.dev_server.https,
  25. host: settings.dev_server.host,
  26. port: settings.dev_server.port,
  27. contentBase: output.path,
  28. publicPath: output.publicPath,
  29. compress: true,
  30. headers: { 'Access-Control-Allow-Origin': '*' },
  31. historyApiFallback: true,
  32. disableHostCheck: true,
  33. watchOptions: watchOptions,
  34. },
  35. });