chore(module-federation): skip webpack-based e2e tests pending webpack 5.107.0 compat#35753
Merged
Conversation
…k 5.107.0 compatibility
webpack 5.107.0 (published 2026-05-20) reorganized lib/ into subdirectories,
breaking deep imports like require('webpack/lib/ModuleNotFoundError') used by
@module-federation/enhanced. Skip the affected e2e tests until upstream is fixed.
Refs:
- webpack/webpack#20985
- module-federation/core#4747
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit c663378
☁️ Nx Cloud last updated this comment at |
…s confirmed failing Reverts the angular portion of the previous commit. Angular MF goes through the same @module-federation/enhanced/webpack code path as react and would theoretically fail too, but only react tests were observed failing in CI. Keeping the angular suites enabled so we get a real signal if/when they hit the same issue.
Co-authored-by: FrozenPandaz <FrozenPandaz@users.noreply.github.com>
AgentEnder
approved these changes
May 20, 2026
Contributor
There was a problem hiding this comment.
Nx Cloud has identified a flaky task in your failed CI:
🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.
🎓 Learn more about Self-Healing CI on nx.dev
FrozenPandaz
added a commit
that referenced
this pull request
May 21, 2026
…bpack 5.107.1 fix is live) (#35764) ## Current Behavior PR #35753 skipped 9 webpack-based React Module Federation e2e suites because webpack 5.107.0 (published 2026-05-20) reorganized its `lib/` directory and removed `lib/ModuleNotFoundError.js`, which `@module-federation/enhanced` deep-imports. Every webpack-based MF build/serve in the affected suites was failing with `Cannot find module 'webpack/lib/ModuleNotFoundError'`. ## Expected Behavior webpack 5.107.1 (published 2026-05-21) restored the path as a backward-compat shim — `lib/ModuleNotFoundError.js` now re-exports from `./errors/ModuleNotFoundError`. Verified locally that all 21 `webpack/lib/*` paths used by `@module-federation/enhanced` 2.4.0 / 2.5.0 now resolve in 5.107.1. This PR removes the `describe.skip` + TODO + `// eslint-disable-next-line jest/no-disabled-tests` lines from the 9 affected files, re-enabling: - `e2e/react/src/module-federation/core-webpack-basic-host-remote-generation.test.ts` - `e2e/react/src/module-federation/core-webpack-basic-playwright.test.ts` - `e2e/react/src/module-federation/core-webpack-name-and-root.test.ts` - `e2e/react/src/module-federation/core-webpack-query-params.test.ts` - `e2e/react/src/module-federation/core-webpack-ssr.test.ts` - `e2e/react/src/module-federation/dynamic-federation.webpack.test.ts` - `e2e/react/src/module-federation/federate-module.webpack.test.ts` - `e2e/react/src/module-federation/independent-deployability.webpack.test.ts` - `e2e/react/src/module-federation/misc-rspack-interoperability.test.ts` ## Related Issue(s) Reverts the skip from #35753. Upstream: - webpack/webpack#20988 (compat shim, merged) - webpack/webpack#20989 (webpack 5.107.1 release, merged)
FrozenPandaz
added a commit
that referenced
this pull request
May 22, 2026
…k 5.107.0 compat (#35753) ## Current Behavior All webpack-based React Module Federation e2e tests started failing on 2026-05-20. Webpack 5.107.0 (published earlier today) reorganized its internal `lib/` directory into subdirectories — e.g. `lib/ModuleNotFoundError.js` moved to `lib/errors/ModuleNotFoundError.js`, `lib/DllPlugin.js` moved to `lib/dll/DllPlugin.js`, etc. `@module-federation/enhanced` (which our generators wire up for webpack-based host/remote apps) deep-imports `require('webpack/lib/ModuleNotFoundError')`, which now throws `MODULE_NOT_FOUND` and aborts every webpack-based MF build/serve in our react e2e suite. Sample failure: ``` NX Cannot find module 'webpack/lib/ModuleNotFoundError' Require stack: - node_modules/@module-federation/enhanced/dist/src/lib/sharing/resolveMatchedConfigs.js - node_modules/@module-federation/enhanced/dist/src/lib/sharing/ConsumeSharedPlugin.js - ... - node_modules/@nx/module-federation/src/with-module-federation/webpack/with-module-federation.js ``` This is upstream's bug, not ours: - webpack/webpack#20985 — closed by webpack maintainer pointing at module-federation - module-federation/core#4747 — open issue for module-federation to stop using private webpack APIs - webpack/webpack#20988 — adds back a `lib/ModuleNotFoundError` compat shim (merged, awaiting a webpack patch release) Even after the shim release lands, other deep imports may still be broken, so we want to fully decouple our CI from this until both ecosystems re-sync. Angular MF goes through the same `@module-federation/enhanced/webpack` code path and would theoretically fail too, but only react tests were observed failing in CI. The angular suites are left enabled so we get a real signal if/when they hit the same issue. ## Expected Behavior CI passes. Webpack-based react MF e2e suites are temporarily skipped with `describe.skip` and a TODO comment linking the upstream tracking issues. Rspack-based MF e2e tests and angular MF e2e tests are untouched and continue to run. Skipped suites: - `e2e/react/src/module-federation/core-webpack-basic-host-remote-generation.test.ts` - `e2e/react/src/module-federation/core-webpack-basic-playwright.test.ts` - `e2e/react/src/module-federation/core-webpack-name-and-root.test.ts` - `e2e/react/src/module-federation/core-webpack-query-params.test.ts` - `e2e/react/src/module-federation/core-webpack-ssr.test.ts` - `e2e/react/src/module-federation/dynamic-federation.webpack.test.ts` - `e2e/react/src/module-federation/federate-module.webpack.test.ts` - `e2e/react/src/module-federation/independent-deployability.webpack.test.ts` - `e2e/react/src/module-federation/misc-rspack-interoperability.test.ts` (both scenarios still build with webpack on one side) ## Related Issue(s) Tracking upstream: - webpack/webpack#20985 - module-federation/core#4747 - webpack/webpack#20988 --------- Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com> Co-authored-by: FrozenPandaz <FrozenPandaz@users.noreply.github.com> (cherry picked from commit a51e340)
FrozenPandaz
added a commit
that referenced
this pull request
May 22, 2026
…bpack 5.107.1 fix is live) (#35764) ## Current Behavior PR #35753 skipped 9 webpack-based React Module Federation e2e suites because webpack 5.107.0 (published 2026-05-20) reorganized its `lib/` directory and removed `lib/ModuleNotFoundError.js`, which `@module-federation/enhanced` deep-imports. Every webpack-based MF build/serve in the affected suites was failing with `Cannot find module 'webpack/lib/ModuleNotFoundError'`. ## Expected Behavior webpack 5.107.1 (published 2026-05-21) restored the path as a backward-compat shim — `lib/ModuleNotFoundError.js` now re-exports from `./errors/ModuleNotFoundError`. Verified locally that all 21 `webpack/lib/*` paths used by `@module-federation/enhanced` 2.4.0 / 2.5.0 now resolve in 5.107.1. This PR removes the `describe.skip` + TODO + `// eslint-disable-next-line jest/no-disabled-tests` lines from the 9 affected files, re-enabling: - `e2e/react/src/module-federation/core-webpack-basic-host-remote-generation.test.ts` - `e2e/react/src/module-federation/core-webpack-basic-playwright.test.ts` - `e2e/react/src/module-federation/core-webpack-name-and-root.test.ts` - `e2e/react/src/module-federation/core-webpack-query-params.test.ts` - `e2e/react/src/module-federation/core-webpack-ssr.test.ts` - `e2e/react/src/module-federation/dynamic-federation.webpack.test.ts` - `e2e/react/src/module-federation/federate-module.webpack.test.ts` - `e2e/react/src/module-federation/independent-deployability.webpack.test.ts` - `e2e/react/src/module-federation/misc-rspack-interoperability.test.ts` ## Related Issue(s) Reverts the skip from #35753. Upstream: - webpack/webpack#20988 (compat shim, merged) - webpack/webpack#20989 (webpack 5.107.1 release, merged) (cherry picked from commit b6858ba)
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
All webpack-based React Module Federation e2e tests started failing on 2026-05-20.
Webpack 5.107.0 (published earlier today) reorganized its internal
lib/directory into subdirectories — e.g.lib/ModuleNotFoundError.jsmoved tolib/errors/ModuleNotFoundError.js,lib/DllPlugin.jsmoved tolib/dll/DllPlugin.js, etc.@module-federation/enhanced(which our generators wire up for webpack-based host/remote apps) deep-importsrequire('webpack/lib/ModuleNotFoundError'), which now throwsMODULE_NOT_FOUNDand aborts every webpack-based MF build/serve in our react e2e suite.Sample failure:
This is upstream's bug, not ours:
ModuleNotFoundErrorfromlib/ModuleNotFoundErrorwebpack/webpack#20988 — adds back alib/ModuleNotFoundErrorcompat shim (merged, awaiting a webpack patch release)Even after the shim release lands, other deep imports may still be broken, so we want to fully decouple our CI from this until both ecosystems re-sync.
Angular MF goes through the same
@module-federation/enhanced/webpackcode path and would theoretically fail too, but only react tests were observed failing in CI. The angular suites are left enabled so we get a real signal if/when they hit the same issue.Expected Behavior
CI passes. Webpack-based react MF e2e suites are temporarily skipped with
describe.skipand a TODO comment linking the upstream tracking issues. Rspack-based MF e2e tests and angular MF e2e tests are untouched and continue to run.Skipped suites:
e2e/react/src/module-federation/core-webpack-basic-host-remote-generation.test.tse2e/react/src/module-federation/core-webpack-basic-playwright.test.tse2e/react/src/module-federation/core-webpack-name-and-root.test.tse2e/react/src/module-federation/core-webpack-query-params.test.tse2e/react/src/module-federation/core-webpack-ssr.test.tse2e/react/src/module-federation/dynamic-federation.webpack.test.tse2e/react/src/module-federation/federate-module.webpack.test.tse2e/react/src/module-federation/independent-deployability.webpack.test.tse2e/react/src/module-federation/misc-rspack-interoperability.test.ts(both scenarios still build with webpack on one side)Related Issue(s)
Tracking upstream:
ModuleNotFoundErrorfromlib/ModuleNotFoundErrorwebpack/webpack#20988