Posted about 1 month ago. Visible to the public. Linked content. Auto-destruct in 5 days

Updated: How to make Webpacker compile once for parallel tests, and only if necessary

The solution was rewritten to be more robust:

  • Fix "ChunkLoadError: Error loading chunk 0" in parallel tests runs (affected apps that have a config.asset_host)
  • Prevent RSpec from compiling packs once for each test process when calling specs without a local webpack-dev-server
  • Don't freeze the parallel tests suite if the first test process crashes during compilation
  • Prevent making a trillion SHA1 hashes over the file contents of every file in app/ during tests
  • Remove duplicate digest logic already implemented in Webpacker itself
  • Also recompile when files in config/webpacker changed (use Webpacker's logic)
  • Fix a bug where multiple packs would be created after the user deleted public/packs-test (to remove a cached build).
Growing Rails Applications in Practice
Check out our new e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Owner of this card:

Henning Koch
Last edit:
about 1 month ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more