webpacker.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. - .tsx
  31. - .ts
  32. - .jsx
  33. - .js
  34. - .sass
  35. - .scss
  36. - .css
  37. - .module.sass
  38. - .module.scss
  39. - .module.css
  40. - .png
  41. - .svg
  42. - .gif
  43. - .jpeg
  44. - .jpg
  45. development:
  46. <<: *default
  47. compile: true
  48. # Verifies that versions and hashed value of the package contents in the project's package.json
  49. check_yarn_integrity: true
  50. # Reference: https://webpack.js.org/configuration/dev-server/
  51. dev_server:
  52. https: false
  53. host: localhost
  54. port: 3035
  55. public: localhost:3035
  56. hmr: true
  57. # Inline should be set to true if using HMR
  58. inline: true
  59. overlay: true
  60. compress: true
  61. disable_host_check: true
  62. use_local_ip: false
  63. quiet: 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