Update config/webpacker.yml

See https://github.com/rails/webpacker/blob/master/docs/v4-upgrade.md

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
This commit is contained in:
Kenji Okimoto 2019-03-13 11:28:28 +09:00
parent 5fcadd376d
commit 707a0baaca

View File

@ -5,6 +5,8 @@ default: &default
source_entry_path: packs source_entry_path: packs
public_output_path: packs public_output_path: packs
cache_path: tmp/cache/webpacker cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
# Additional paths webpack should lookup modules # Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets'] # ['app/assets', 'engine/foo/app/assets']
@ -13,8 +15,26 @@ default: &default
# Reload manifest.json on all requests so we reload latest compiled packs # Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false cache_manifest: false
# Extract and emit a css file
extract_css: false
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions: extensions:
- .vue - .vue
- .mjs
- .js - .js
- .sass - .sass
- .scss - .scss
@ -49,7 +69,7 @@ development:
headers: headers:
'Access-Control-Allow-Origin': '*' 'Access-Control-Allow-Origin': '*'
watch_options: watch_options:
ignored: /node_modules/ ignored: '**/node_modules/**'
test: test:
@ -65,5 +85,8 @@ production:
# Production depends on precompilation of packs prior to booting for performance. # Production depends on precompilation of packs prior to booting for performance.
compile: false compile: false
# Extract and emit a css file
extract_css: true
# Cache manifest.json for performance # Cache manifest.json for performance
cache_manifest: true cache_manifest: true