electrode icon indicating copy to clipboard operation
electrode copied to clipboard

feat: Add Webpack 5 filesystem cache support for Electrode SubApps

Open kylejeske opened this issue 3 months ago • 1 comments

Enables webpack 5's persistent filesystem cache to work with Electrode's SubApp architecture by adding serialization support to SubAppHotAcceptDependency.

Changes:

  • Added serialize() and deserialize() methods to SubAppHotAcceptDependency
  • Registered dependency with webpack's serialization utility
  • Fixed electrode-node-resolver to include optional-require as direct dependency
  • Added conditional logging behind VERBOSE flag

Benefits:

  • 2-3x faster dev server restarts (e.g., 2.1s vs 4.5s cold start)
  • ~99.9% cache hit rate on warm restarts
  • Significantly improved developer experience

Testing:

  • Verified cache serialization/deserialization works correctly
  • Confirmed subapps load properly with filesystem cache enabled
  • Tested with VERBOSE=true build metrics showing 100% cache hit rate

kylejeske avatar Nov 20 '25 23:11 kylejeske

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 20 '25 23:11 CLAassistant