From fe3d56e8dfd201543abf42db13f6cad0171c0074 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Fri, 13 Dec 2019 17:13:29 +0100 Subject: [PATCH] add config to webpacker --- config/routes.rb | 2 +- config/webpacker.yml | 16 ++++++---------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index b667cfb71..5411cff58 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -7,7 +7,7 @@ Sidekiq::Web.set :session_secret, Rails.application.secrets[:secret_key_base] Rails.application.routes.draw do root 'home#index' - resources :user_groups + mount LetterOpenerWeb::Engine, at: 'letter_opener' if Rails.env.development? health_check_routes diff --git a/config/webpacker.yml b/config/webpacker.yml index 46ed57ddb..4ad78a190 100644 --- a/config/webpacker.yml +++ b/config/webpacker.yml @@ -17,13 +17,12 @@ default: &default cache_manifest: false # Extract and emit a css file - extract_css: false + extract_css: true static_assets_extensions: - .jpg - .jpeg - .png - - .gif - .tiff - .ico - .svg @@ -50,10 +49,8 @@ default: &default development: <<: *default - compile: true - # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules - check_yarn_integrity: true + compile: true # Reference: https://webpack.js.org/configuration/dev-server/ dev_server: @@ -74,10 +71,12 @@ development: watch_options: ignored: '**/node_modules/**' - test: <<: *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 public_output_path: packs-test @@ -88,8 +87,5 @@ production: # Production depends on precompilation of packs prior to booting for performance. compile: false - # Extract and emit a css file - extract_css: true - # Cache manifest.json for performance cache_manifest: true