add config to webpacker

This commit is contained in:
Baptiste Lemoine 2019-12-13 17:13:29 +01:00
parent ecc56a345e
commit fe3d56e8df
2 changed files with 7 additions and 11 deletions

View File

@ -7,7 +7,7 @@ Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base]
Rails.application.routes.draw do Rails.application.routes.draw do
root 'home#index' root 'home#index'
resources :user_groups
mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development? mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development?
health_check_routes health_check_routes

View File

@ -17,13 +17,12 @@ default: &default
cache_manifest: false cache_manifest: false
# Extract and emit a css file # Extract and emit a css file
extract_css: false extract_css: true
static_assets_extensions: static_assets_extensions:
- .jpg - .jpg
- .jpeg - .jpeg
- .png - .png
- .gif
- .tiff - .tiff
- .ico - .ico
- .svg - .svg
@ -50,10 +49,8 @@ default: &default
development: development:
<<: *default <<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules compile: true
check_yarn_integrity: true
# Reference: https://webpack.js.org/configuration/dev-server/ # Reference: https://webpack.js.org/configuration/dev-server/
dev_server: dev_server:
@ -74,10 +71,12 @@ development:
watch_options: watch_options:
ignored: '**/node_modules/**' ignored: '**/node_modules/**'
test: test:
<<: *default <<: *default
compile: true
# CircleCI precompiles packs prior to running the tests.
# Also avoids race conditions in parallel_tests.
compile: false
# Compile test packs to a separate directory # Compile test packs to a separate directory
public_output_path: packs-test public_output_path: packs-test
@ -88,8 +87,5 @@ 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