Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. const webpack = require('webpack');
  2. exports.devServer = function(options) {
  3. return {
  4. devServer: {
  5. // contentBase: options.contentBase,
  6. // Enable history API fallback so HTML5 History API based
  7. // routing works. This is a good default that will come
  8. // in handy in more complicated setups.
  9. historyApiFallback: true,
  10. // Unlike the cli flag, this doesn't set
  11. // HotModuleReplacementPlugin!
  12. hot: true,
  13. inline: true,
  14. // Display only errors to reduce the amount of output.
  15. stats: 'errors-only',
  16. // Parse host and port from env to allow customization.
  17. //
  18. // If you use Vagrant or Cloud9, set
  19. // host: options.host || '0.0.0.0';
  20. //
  21. // 0.0.0.0 is available to all network devices
  22. // unlike default `localhost`.
  23. host: options.host, // Defaults to `localhost`
  24. port: options.port, // Defaults to 8080
  25. // progress: true
  26. },
  27. plugins: [
  28. // Enable multi-pass compilation for enhanced performance // in larger projects. Good default.
  29. new webpack.HotModuleReplacementPlugin({
  30. multiStep: true
  31. })
  32. ]
  33. };
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement