Skip to content

fix(CI): keep full module graph in karma bundle on webpack >= 5.112 - #1723

Open
sharmabikram wants to merge 4 commits into
masterfrom
shbikram/fix-ci
Open

sharmabikram wants to merge 4 commits into
masterfrom
shbikram/fix-ci

Conversation

@sharmabikram

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Fixes the daily CI

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@sharmabikram
sharmabikram requested a review from a team as a code owner October 28, 2026 21:24
Comment on lines +49 to +54
// webpack >= 5.112 defers the re-exports of packages marked
// `sideEffects: false` and, in development mode, drops modules that
// our `export *` barrels need (e.g. @aws-crypto/cache-material),
// so the bundle builds but throws at runtime. Treating every module
// as side-effectful keeps the full module graph. karma-webpack
// ignores `optimization`, so this has to be a module rule.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't quite understand what this is trying to say

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair — that was too jargon-heavy. Reworded it to say what actually happens: our packages declare "sideEffects": false, webpack 5.112+ dev builds use that to skip re-exported modules (dropping @aws-crypto/cache-material), and this rule makes webpack include everything. Also noted why it's a module rule rather than optimization.sideEffects (karma-webpack strips optimization).

josecorella
josecorella previously approved these changes Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants