Skip to content

Comments

refactor(build): migrate Nx executors to vanilla CLI targets#4455

Open
ScriptedAlchemy wants to merge 36 commits intomainfrom
cursor/migration-from-nx-webpack-to-vanilla-webpack-c57c
Open

refactor(build): migrate Nx executors to vanilla CLI targets#4455
ScriptedAlchemy wants to merge 36 commits intomainfrom
cursor/migration-from-nx-webpack-to-vanilla-webpack-c57c

Conversation

@ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Feb 17, 2026

Description

This PR is the final consolidated branch for migrating Nx webpack/rspack executors to vanilla CLI-based executors.

Included stacked PRs:

Scope in this PR:

  • Replace @nx/webpack:* and @nx/rspack:* targets with nx:run-commands + webpack-cli / rspack commands.
  • Convert app bundler configs from Nx compose-plugin wrappers to explicit vanilla webpack/rspack config objects.
  • Update E2E orchestration for manifest/runtime flows (wait-on, readiness checks, startup sequencing).
  • Add shared Cypress browser error logging helper and wire it into affected app support files.
  • Keep supporting executor-migration config updates needed for these flows.

Related Issue

N/A

Types of changes

  • Refactor / build-system migration
  • CI / test workflow updates
  • New feature
  • Breaking API change

Checklist

  • Changes are consolidated into a single top-level PR for merge to main.
  • Full CI is green on this PR.
  • Additional follow-up cleanup (if any) is tracked separately.

@cursor
Copy link

cursor bot commented Feb 17, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2026

🦋 Changeset detected

Latest commit: d99aeb3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 43 packages
Name Type
@module-federation/devtools Patch
@module-federation/runtime Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/modern-js-v3 Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/rsbuild-plugin Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/cli Patch
@module-federation/rspress-plugin Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend Patch
@module-federation/metro Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch
remote5 Patch
remote6 Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
website-new Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Feb 17, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit d99aeb3
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6997837b1fa42000081c7f08
😎 Deploy Preview https://deploy-preview-4455--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 17, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/devtools@d99aeb3

@module-federation/cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/cli@d99aeb3

create-module-federation

pnpm add https://pkg.pr.new/module-federation/core/create-module-federation@d99aeb3

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/data-prefetch@d99aeb3

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/dts-plugin@d99aeb3

@module-federation/enhanced

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/enhanced@d99aeb3

@module-federation/error-codes

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/error-codes@d99aeb3

@module-federation/managers

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/managers@d99aeb3

@module-federation/manifest

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/manifest@d99aeb3

@module-federation/metro

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro@d99aeb3

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnc-cli@d99aeb3

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnef@d99aeb3

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/modern-js-v3@d99aeb3

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/retry-plugin@d99aeb3

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rsbuild-plugin@d99aeb3

@module-federation/rspack

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspack@d99aeb3

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspress-plugin@d99aeb3

@module-federation/runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime@d99aeb3

@module-federation/runtime-core

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-core@d99aeb3

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-tools@d99aeb3

@module-federation/sdk

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/sdk@d99aeb3

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/third-party-dts-extractor@d99aeb3

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-frontend@d99aeb3

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-server@d99aeb3

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/webpack-bundler-runtime@d99aeb3

@module-federation/bridge-react

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react@d99aeb3

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react-webpack-plugin@d99aeb3

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-shared@d99aeb3

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-vue3@d99aeb3

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/inject-external-runtime-core-plugin@d99aeb3

commit: d99aeb3

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

Bundle Size Report

1 package(s) changed, 40 unchanged.

Package Total dist Delta ESM gzip Delta
chrome-devtools 473.2 kB +462 B (+0.1%) 3.9 kB no change

Total dist: 6.89 MB (+462 B (+0.0%))
Total ESM gzip: 138.6 kB (no change)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Migrates multiple Nx applications away from @nx/webpack executors to nx:run-commands that invoke webpack-cli directly, while also improving e2e diagnostics/readiness (Cypress browser log capture + more robust wait-on targets for manifest e2e).

Changes:

  • Replace @nx/webpack:* / @nx/react:module-federation-dev-server targets with nx:run-commands commands that call webpack-cli/webpack-cli serve.
  • Convert several Nx-composed webpack configs to standalone “vanilla” webpack configs (SWC, CSS handling, HtmlWebpackPlugin, devServer, etc.).
  • Add Cypress browser error/log capture utility and wire it into multiple Cypress support entrypoints; strengthen manifest e2e “wait-on” coverage.

Reviewed changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
tools/testing/cypress/browser-error-logging.ts New Cypress helper to capture browser console/errors/fetch failures and print them on test failure.
tools/scripts/run-manifest-e2e.mjs Expands wait-on targets to include additional ports and HTTP checks for manifest scenario readiness.
packages/retry-plugin/src/index.ts Adds an explicit (but broad) type annotation for loadEntryError destructured args.
package.json Adjusts runtime demo dev script to run serve in development configuration.
nx.json Removes targetDefaults block specific to @nx/webpack:webpack.
apps/shared-tree-shaking/with-server/host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/shared-tree-shaking/no-server/host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/runtime-demo/3007-runtime-remote/webpack.config.js Replaces Nx plugin composition with standalone webpack config.
apps/runtime-demo/3007-runtime-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/runtime-demo/3006-runtime-remote/webpack.config.js Replaces Nx plugin composition with standalone webpack config.
apps/runtime-demo/3006-runtime-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/runtime-demo/3005-runtime-host/webpack.config.js Replaces Nx plugin composition with standalone webpack config.
apps/runtime-demo/3005-runtime-host/project.json Switches build/serve targets to nx:run-commands; improves e2e orchestration with wait-on.
apps/runtime-demo/3005-runtime-host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/router-demo/router-host-2000/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/reactStorybook/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/reactRemoteUI/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/react-ts-remote/project.json Switches webpack build/serve targets to nx:run-commands calling webpack-cli.
apps/react-ts-nested-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/react-ts-host/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/node-remote/webpack.config.js Replaces Nx plugin composition with standalone webpack config (node externals + SWC).
apps/node-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/node-local-remote/webpack.config.js Replaces Nx plugin composition with standalone webpack config (node externals + SWC).
apps/node-local-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/node-host/webpack.config.js Replaces Nx plugin composition with standalone webpack config (node externals).
apps/node-host/project.json Switches build target to nx:run-commands calling webpack-cli.
apps/node-dynamic-remote/webpack.config.js Replaces Nx plugin composition with standalone webpack config (node externals + SWC).
apps/node-dynamic-remote/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/node-dynamic-remote-new-version/webpack.config.js Replaces Nx plugin composition with standalone webpack config (node externals + SWC).
apps/node-dynamic-remote-new-version/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/next-app-router/next-app-router-4001/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/next-app-router/next-app-router-4000/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/modernjs-ssr/host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/modernjs-ssr/dynamic-nested-remote/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/modern-component-data-fetch/host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/manifest-demo/webpack-host/webpack.config.js Replaces Nx plugin composition with standalone webpack config.
apps/manifest-demo/webpack-host/project.json Switches build/serve targets to nx:run-commands calling webpack-cli; improves e2e orchestration with wait-on.
apps/manifest-demo/webpack-host/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/manifest-demo/3012-rspack-js-entry-provider/project.json Updates rspack serve options (adds host).
apps/manifest-demo/3011-rspack-manifest-provider/project.json Updates rspack serve options (adds host).
apps/manifest-demo/3010-rspack-provider/project.json Updates rspack serve options (adds host).
apps/manifest-demo/3009-webpack-provider/webpack.config.js Replaces Nx plugin composition with standalone webpack config.
apps/manifest-demo/3009-webpack-provider/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/docs-ui/project.json Switches build target to nx:run-commands calling webpack-cli.
apps/bundle-size/project.json Switches build/serve targets to nx:run-commands calling webpack-cli.
apps/bundle-size/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/3002-checkout/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/3001-shop/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.
apps/3000-home/cypress/support/e2e.ts Imports shared Cypress browser error logging helper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ScriptedAlchemy ScriptedAlchemy marked this pull request as ready for review February 18, 2026 02:16
@ScriptedAlchemy ScriptedAlchemy changed the title Migration from nx webpack to vanilla webpack refactor(build): migrate Nx webpack targets to webpack-cli Feb 18, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 949608680f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ScriptedAlchemy ScriptedAlchemy changed the title refactor(build): migrate Nx webpack targets to webpack-cli refactor(build): migrate Nx executors to vanilla CLI targets Feb 19, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 100 out of 101 changed files in this pull request and generated 3 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 101 out of 102 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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