webpack.config.dev.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. const merge = require('webpack-merge')
  2. const MiniCssExtractPlugin = require('mini-css-extract-plugin')
  3. const base = require('./webpack.config')
  4. module.exports = merge(base, {
  5. mode: 'development',
  6. // Enable accurate source maps for dev
  7. devtool: 'eval-source-map',
  8. plugins: [
  9. // Extract CSS to a separate file (rather than inlining to a <style> tag)
  10. new MiniCssExtractPlugin({
  11. // Output to public/stylesheets directory
  12. filename: 'stylesheets/[name].css'
  13. })
  14. ],
  15. devServer: {
  16. // Expose dev server at www.dev-overleaf.com
  17. host: '0.0.0.0',
  18. port: 3808,
  19. public: 'www.dev-overleaf.com:443',
  20. // Customise output to the (node) console
  21. stats: {
  22. colors: true, // Enable some coloured highlighting
  23. // Hide some overly verbose output
  24. performance: false, // Disable as code is uncompressed in dev mode
  25. hash: false,
  26. version: false,
  27. chunks: false,
  28. modules: false,
  29. // Hide copied assets from output
  30. excludeAssets: [/^js\/ace/, /^js\/libs/, /^js\/cmaps/]
  31. }
  32. }
  33. })