diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index bcb9d022908..432897f5efd 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -75,9 +75,13 @@ class Analytics # rubocop:enable Style/GlobalVars # rubocop:disable Rails/Output print ' Bundling JavaScript and stylesheets... ' - system 'WEBPACK_PORT= yarn concurrently "yarn:build:*" > /dev/null 2>&1' + system 'yarn concurrently "yarn:build:*" > /dev/null 2>&1' puts '✨ Done!' # rubocop:enable Rails/Output + + # The JavaScript assets manifest is cached by the application. Since the preceding build will + # write a new manifest, instruct the application to refresh the cache from disk. + Rails.application.config.asset_sources.load_manifest end end