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