2
0

webpacker.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. webpack_compile_output: true
  9. # Additional paths webpack should lookup modules
  10. # ['app/assets', 'engine/foo/app/assets']
  11. additional_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. - .mjs
  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. # Reference: https://webpack.js.org/configuration/dev-server/
  47. dev_server:
  48. https: false
  49. host: localhost
  50. port: 3035
  51. public: localhost:3035
  52. hmr: false
  53. # Inline should be set to true if using HMR
  54. inline: true
  55. overlay: true
  56. compress: true
  57. disable_host_check: true
  58. use_local_ip: false
  59. quiet: false
  60. pretty: false
  61. headers:
  62. 'Access-Control-Allow-Origin': '*'
  63. watch_options:
  64. ignored: '**/node_modules/**'
  65. test:
  66. <<: *default
  67. compile: true
  68. # Compile test packs to a separate directory
  69. public_output_path: packs-test
  70. production:
  71. <<: *default
  72. # Production depends on precompilation of packs prior to booting for performance.
  73. compile: false
  74. # Extract and emit a css file
  75. extract_css: true
  76. # Cache manifest.json for performance
  77. cache_manifest: true