webpacker.yml 1.8 KB

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