webpacker.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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: false
  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: true
  17. static_assets_extensions:
  18. - .jpg
  19. - .jpeg
  20. - .png
  21. - .tiff
  22. - .ico
  23. - .svg
  24. - .eot
  25. - .otf
  26. - .ttf
  27. - .woff
  28. - .woff2
  29. extensions:
  30. - .mjs
  31. - .js
  32. - .jsx
  33. - .ts
  34. - .tsx
  35. - .sass
  36. - .scss
  37. - .css
  38. - .module.sass
  39. - .module.scss
  40. - .module.css
  41. - .png
  42. - .svg
  43. - .gif
  44. - .jpeg
  45. - .jpg
  46. development:
  47. <<: *default
  48. compile: 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. headers:
  64. 'Access-Control-Allow-Origin': '*'
  65. watch_options:
  66. ignored: '**/node_modules/**'
  67. test:
  68. <<: *default
  69. # CI precompiles packs prior to running the tests.
  70. # Also avoids race conditions in parallel_tests.
  71. compile: false
  72. # Compile test packs to a separate directory
  73. public_output_path: packs-test
  74. production:
  75. <<: *default
  76. # Production depends on precompilation of packs prior to booting for performance.
  77. compile: false
  78. # Cache manifest.json for performance
  79. cache_manifest: true