diff --git a/config/environments/development.rb b/config/environments/development.rb index 693b0a0f..109223f2 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,6 +6,18 @@ Rails.application.configure do # rubocop:disable Metrics/BlockLength # Settings specified here will take precedence over those in config/application.rb. + # Pass in an env variable ASSETS_COMPILED_LIKE_IN_PROD + # to test without assets compiled, like in prod. + # You then need to run + # - yarn build + # - yarn build:css + # - rails assets:precompile + # to get the assets ready before booting the app. + if ENV["ASSETS_COMPILED_LIKE_IN_PROD"].present? + config.assets.compile = false + config.serve_static_files = true + end + # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes.