webpacker.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Note: You must restart bin/webpack-dev-server for changes to take effect
  2. default: &default
  3. source_path: app/javascript
  4. source_entry_path: packs
  5. public_root_path: public
  6. public_output_path: packs
  7. cache_path: tmp/cache/webpacker
  8. check_yarn_integrity: false
  9. webpack_compile_output: true
  10. # Additional paths webpack should lookup modules
  11. # ['app/assets', 'engine/foo/app/assets']
  12. resolved_paths: []
  13. # Reload manifest.json on all requests so we reload latest compiled packs
  14. cache_manifest: false
  15. # Extract and emit a css file
  16. extract_css: false
  17. static_assets_extensions:
  18. - .jpg
  19. - .jpeg
  20. - .png
  21. - .gif
  22. - .tiff
  23. - .ico
  24. - .svg
  25. - .eot
  26. - .otf
  27. - .ttf
  28. - .woff
  29. - .woff2
  30. extensions:
  31. - .mjs
  32. - .js
  33. - .sass
  34. - .scss
  35. - .css
  36. - .module.sass
  37. - .module.scss
  38. - .module.css
  39. - .png
  40. - .svg
  41. - .gif
  42. - .jpeg
  43. - .jpg
  44. development:
  45. <<: *default
  46. compile: true
  47. # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
  48. check_yarn_integrity: true
  49. # Reference: https://webpack.js.org/configuration/dev-server/
  50. dev_server:
  51. https: false
  52. host: localhost
  53. port: 3035
  54. public: localhost:3035
  55. hmr: false
  56. # Inline should be set to true if using HMR
  57. inline: true
  58. overlay: true
  59. compress: true
  60. disable_host_check: true
  61. use_local_ip: false
  62. quiet: false
  63. pretty: false
  64. headers:
  65. 'Access-Control-Allow-Origin': '*'
  66. watch_options:
  67. ignored: '**/node_modules/**'
  68. test:
  69. <<: *default
  70. compile: true
  71. # Compile test packs to a separate directory
  72. public_output_path: packs-test
  73. production:
  74. <<: *default
  75. # Production depends on precompilation of packs prior to booting for performance.
  76. compile: false
  77. # Extract and emit a css file
  78. extract_css: true
  79. # Cache manifest.json for performance
  80. cache_manifest: true