Skip to content

feat(nextjs-mf): RSC Support #3736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 147 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 139 commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
28f9c5f
chore: improve test output clarity and remove problematic test directory
ScriptedAlchemy Aug 2, 2025
aad6e9e
feat(enhanced): comprehensive ProvideSharedPlugin test coverage (#3969)
ScriptedAlchemy Aug 3, 2025
4c6df8f
chore: remove generated code coverage files
ScriptedAlchemy Aug 3, 2025
e9372fb
chore: x
ScriptedAlchemy Aug 4, 2025
58442a7
PR8: SharePlugin - Unified API (#3914)
ScriptedAlchemy Aug 11, 2025
746536d
chore: add test for filter
ScriptedAlchemy Apr 29, 2025
de9072f
feat(enhanced): add filter option for shared modules
ScriptedAlchemy Apr 29, 2025
81b5d1e
feat(enhanced): add filter test
ScriptedAlchemy Apr 29, 2025
562221d
chore: restore tests
ScriptedAlchemy Apr 29, 2025
0a93219
chore: restore tests
ScriptedAlchemy Apr 29, 2025
10ba6fa
chore: restore tests
ScriptedAlchemy Apr 29, 2025
6683ff1
fix(enhanced): update share plugin schema
ScriptedAlchemy Apr 29, 2025
56d0909
feat(enhanced): exclude shares by semver (#3744)
ScriptedAlchemy May 11, 2025
9f784bc
chore: remove log in test
ScriptedAlchemy May 11, 2025
86f7740
docs: add sharing documentation
ScriptedAlchemy May 12, 2025
8d9730e
docs: add tests back
ScriptedAlchemy May 12, 2025
44110a5
test: add consume share plugin compiler tests
ScriptedAlchemy May 12, 2025
62d4150
test: add consume share plugin compiler tests
ScriptedAlchemy May 12, 2025
ce95954
test: add consume share plugin compiler tests
ScriptedAlchemy May 12, 2025
36aa95b
test: add comprehensive tests for ConsumeSharedPlugin with layer hand…
ScriptedAlchemy May 13, 2025
5f815d2
chore: locks
ScriptedAlchemy May 13, 2025
8bf47a6
fix: update tests for provide shared
ScriptedAlchemy May 13, 2025
d39c63c
chore: lint
ScriptedAlchemy May 13, 2025
6cd3102
feat: add singleton validation warnings for include/exclude
ScriptedAlchemy May 13, 2025
5334e5d
chore: remove implicit dep
ScriptedAlchemy May 13, 2025
716d834
chore: changeset
ScriptedAlchemy May 13, 2025
b209de8
chore: nx mcp
ScriptedAlchemy May 15, 2025
cfeeacb
chore(3001-shop): sync project.json serve parallel and e2e logic
ScriptedAlchemy May 16, 2025
74f9164
chore: locks
ScriptedAlchemy May 16, 2025
10c072a
chore: locks
ScriptedAlchemy May 16, 2025
4dcfe73
chore: add missing next deps
ScriptedAlchemy May 16, 2025
cdbe61a
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
7d2fd2a
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
92f1b2f
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
e073b0a
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
2838a51
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
7e4a624
chore: update cmd syntax exit
ScriptedAlchemy May 16, 2025
5a3fdc6
chore: refactor E2E testing workflow to separate tests for each app a…
ScriptedAlchemy May 16, 2025
be727a5
chore: locks
ScriptedAlchemy May 30, 2025
623b7c1
test: update ProvideSharedPlugin and SharePlugin tests to verify node…
ScriptedAlchemy Jul 1, 2025
30b5f89
chore: update Nx version to 21.0.3 and change package manager to pnpm…
ScriptedAlchemy Jul 1, 2025
cff3627
feat: integrate Module Federation core sharing plugin updates
ScriptedAlchemy Jul 1, 2025
ea5ef51
feat: complete incremental Module Federation ProvideSharedPlugin updates
ScriptedAlchemy Jul 1, 2025
6a150b3
feat(enhanced): add nodeModulesReconstructedLookup support
ScriptedAlchemy Jul 1, 2025
372b9ed
feat(enhanced): remove complex singleton warnings from factorize hook
ScriptedAlchemy Jul 1, 2025
fe28325
docs: refresh mermaid diagrams and remove sections
ScriptedAlchemy Jul 1, 2025
7d520e0
docs: remove Advanced Patterns & Use Cases section
ScriptedAlchemy Jul 1, 2025
7d28536
fix: resolve Mermaid sequence diagram CSP participant activation/deac…
ScriptedAlchemy Jul 1, 2025
af21d0f
chore: no build cache nx in ci
ScriptedAlchemy Jul 1, 2025
5595721
chore: ci
ScriptedAlchemy Jul 1, 2025
26e594b
chore: ci
ScriptedAlchemy Jul 1, 2025
e8ddfa2
feat(enhanced): update hook system for container dependency management
ScriptedAlchemy Jul 1, 2025
c2138b2
feat(nextjs-mf): complete migration from app-router-share-filter to s…
ScriptedAlchemy Jul 2, 2025
81b0331
fix(enhanced): add CI stability improvements to jest configurations
ScriptedAlchemy Jul 2, 2025
f0d322f
fix(enhanced): resolve jest maxWorkers validation error
ScriptedAlchemy Jul 2, 2025
f663d7f
fix(enhanced): restore jest configurations to original state
ScriptedAlchemy Jul 2, 2025
754845c
feat(nextjs-mf): rewrite outdated tests with proper mocks
ScriptedAlchemy Jul 2, 2025
1bf1276
fix(nextjs-mf): simplify tests to eliminate interference issues
ScriptedAlchemy Jul 2, 2025
5957304
feat: update e2e scripts to test all three Next.js apps (home, shop, …
ScriptedAlchemy Jul 2, 2025
9bc80b5
feat: add individual e2e test scripts for Next.js apps
ScriptedAlchemy Jul 3, 2025
38e3155
feat: incremental merge of share-filter branch changes (#3879)
ScriptedAlchemy Jul 3, 2025
6f911c1
chore: remove rslib
ScriptedAlchemy Jul 6, 2025
0c0c295
chore: remove rslib
ScriptedAlchemy Jul 6, 2025
6d26aa0
feat(nextjs-mf): increment 1 - migrate enhanced test file from app-ro…
ScriptedAlchemy Jul 6, 2025
de8ffdb
fix(nextjs-mf): fix failing internal tests by mocking Next.js version
ScriptedAlchemy Jul 6, 2025
3959bc8
chore: restore rslib module app
ScriptedAlchemy Jul 6, 2025
aeb8b77
feat: sync all Next.js versions to 15.3.3 and enable remote components
ScriptedAlchemy Jul 6, 2025
314a22b
chore: lock file
ScriptedAlchemy Jul 6, 2025
c3c6187
fix: resolve React 19 TypeScript compatibility in chrome-devtools
ScriptedAlchemy Jul 5, 2025
3f3dd49
fix(managers): update snapshot for React 19 compatibility
ScriptedAlchemy Jul 6, 2025
8e39ee4
fix: resolve React version conflicts in Next.js apps
ScriptedAlchemy Jul 1, 2025
39908a4
fix: add safety checks for webpack startup functions
ScriptedAlchemy Jul 1, 2025
6b23f8f
chore: lock file
ScriptedAlchemy Jul 6, 2025
51d8a61
fix: update SharedManager snapshot for React 19.1.0
ScriptedAlchemy Jul 6, 2025
ab341d4
fix(data-prefetch): react 19 compatibility fixes
ScriptedAlchemy Jul 6, 2025
9990c08
fix(data-prefetch): update pnpm lockfile after react 19 upgrade
ScriptedAlchemy Jul 6, 2025
18b827d
fix(bridge-react): react 19 compatibility for tests
ScriptedAlchemy Jul 6, 2025
fdea9ae
fix(bridge-react): update tests to handle React 19 async rendering
ScriptedAlchemy Jul 6, 2025
177c822
feat: merge increment A - CI/CD and development infrastructure
ScriptedAlchemy Jul 6, 2025
29d5e3c
chore: update pnpm lockfile after increment A package.json changes
ScriptedAlchemy Jul 6, 2025
23cf673
feat: merge increment B - documentation and changesets
ScriptedAlchemy Jul 6, 2025
74c2c53
feat: merge increment C - core package dependencies
ScriptedAlchemy Jul 6, 2025
9fa2ab5
feat: merge increment D - enhanced library core changes
ScriptedAlchemy Jul 6, 2025
9dccd37
fix: resolve React 19 TypeScript compatibility in modernjs package
ScriptedAlchemy Jul 6, 2025
21e5634
fix(nextjs-mf): resolve test failure by mocking getNextVersion for Ne…
ScriptedAlchemy Jul 6, 2025
c47d4df
feat: merge increment E - bridge and data prefetch updates
ScriptedAlchemy Jul 6, 2025
d53dc6d
fix: update React dependencies to v19.0.0 across packages
ScriptedAlchemy Jul 6, 2025
1f015a4
fix: update React dependencies to v19.0.0 across packages
ScriptedAlchemy Jul 6, 2025
ddcb1ed
fix: use pnpm overrides for React 19 instead of individual package edits
ScriptedAlchemy Jul 6, 2025
98b5732
fix: update packages to React 19 individually instead of global overr…
ScriptedAlchemy Jul 6, 2025
9f859fa
fix: resolve React 19 compatibility issues in bridge-react
ScriptedAlchemy Jul 6, 2025
96f734e
fix: remove accidental __mocks__ files causing CI format failure
ScriptedAlchemy Jul 6, 2025
e1d4a34
fix(bridge-react): resolve React 19 testing warnings and race conditions
ScriptedAlchemy Jul 6, 2025
8aef3aa
feat(next-app-router-4000): merge enhanced layer support for Next.js …
ScriptedAlchemy Jul 6, 2025
d8b2595
feat(next-app-router-4001): merge enhanced layer support for Next.js …
ScriptedAlchemy Jul 6, 2025
d76f505
feat(runtime-core,node): merge enhanced layer support for runtime and…
ScriptedAlchemy Jul 6, 2025
9a0ef18
feat: complete enhanced layer support integration and add .node file …
ScriptedAlchemy Jul 6, 2025
d931787
fix: restore missing files from app-router-share-filter and remove te…
ScriptedAlchemy Jul 6, 2025
dfb51ad
fix: clean up remaining file differences and update dependencies
ScriptedAlchemy Jul 6, 2025
168e3d0
fix(3001-shop,3002-checkout): restore workspace dependencies
ScriptedAlchemy Jul 7, 2025
1c481a1
fix(nextjs-mf): correct path to next-flight-loader
ScriptedAlchemy Jul 7, 2025
ba75991
chore: lock file
ScriptedAlchemy Jul 7, 2025
fe26736
chore: fix sh
ScriptedAlchemy Jul 7, 2025
83e8fad
fix(3000-home,3002-checkout): restore e2e configurations from working…
ScriptedAlchemy Jul 7, 2025
e2ed2e7
feat: restore old CI infrastructure for Next.js e2e tests
ScriptedAlchemy Jul 7, 2025
276b05b
App router share filter (#3745)
ScriptedAlchemy Jul 8, 2025
e82398d
test: trigger CI workflow (#3890)
ScriptedAlchemy Jul 8, 2025
95d0412
Potential fix for code scanning alert no. 132: Workflow does not cont…
ScriptedAlchemy Jul 9, 2025
ea1188b
Share flalback (#3893)
ScriptedAlchemy Jul 11, 2025
a6873a9
docs: add incremental PR plan for breaking up enhanced package changes
ScriptedAlchemy Jul 11, 2025
2f5509a
docs: add incremental PR plan for breaking up enhanced package changes
ScriptedAlchemy Jul 12, 2025
30f26c6
fix: include request warning logs in ProvideSharedPlugin (#3906)
adit-shah-devrev Jul 19, 2025
a66c266
chore: fix conflicts
ScriptedAlchemy Aug 7, 2025
e7a48b6
fix: resolve 500 Internal Server Error in 3002-checkout app
ScriptedAlchemy Aug 7, 2025
5da76b9
chore: fix conflicts
ScriptedAlchemy Aug 7, 2025
2061436
test: update error message expectations for loadShareSync
ScriptedAlchemy Aug 7, 2025
faea64e
feat: incremental merge of share-filter branch changes (#3879)
ScriptedAlchemy Aug 7, 2025
055deac
Apply suggested changes
ScriptedAlchemy Aug 8, 2025
a3f59d6
Apply suggested changes
ScriptedAlchemy Aug 11, 2025
cf24e4f
Apply suggested changes
ScriptedAlchemy Aug 11, 2025
073e5f6
Apply suggested changes
ScriptedAlchemy Aug 11, 2025
b8bc356
chore: clean up changeset descriptions
ScriptedAlchemy Aug 11, 2025
cfb3e6c
Merge branch 'main' into pr9-implementation
ScriptedAlchemy Aug 12, 2025
accbdad
chore: fix package conflicts
ScriptedAlchemy Aug 12, 2025
d9a89a4
chore: fix package conflicts
ScriptedAlchemy Aug 12, 2025
f9ec75f
Merge remote-tracking branch 'origin/pr9-implementation' into share-f…
ScriptedAlchemy Aug 12, 2025
03e4d39
chore: tests
ScriptedAlchemy Aug 12, 2025
bc073dc
fix(enhanced): fix ModuleNotFoundError mock implementation in tests
ScriptedAlchemy Aug 12, 2025
80a7180
fix(enhanced): correct ModuleNotFoundError mock formatting
ScriptedAlchemy Aug 12, 2025
3189c6c
chore: merge main
ScriptedAlchemy Aug 13, 2025
c409612
Merge branch 'pr9-implementation' into share-filter
ScriptedAlchemy Aug 13, 2025
40b5851
Merge branch 'main' into share-filter
ScriptedAlchemy Aug 13, 2025
2792b05
fix: resolve merge conflicts in ProvideSharedPlugin.ts
ScriptedAlchemy Aug 13, 2025
c715bb9
fix: resolve remaining merge conflicts
ScriptedAlchemy Aug 13, 2025
ef9809b
fix: resolve merge conflict in data-prefetch react test
ScriptedAlchemy Aug 13, 2025
03ba808
fix(enhanced): resolve TypeScript errors in ConsumeSharedPlugin
ScriptedAlchemy Aug 13, 2025
5767e77
Apply suggested changes
ScriptedAlchemy Aug 13, 2025
3645a7e
Apply suggested changes
ScriptedAlchemy Aug 13, 2025
ad1f040
Apply suggested changes
ScriptedAlchemy Aug 13, 2025
618fcb8
fix(enhanced): resolve TypeScript errors in ProvideSharedPlugin
ScriptedAlchemy Aug 13, 2025
84a9642
Apply suggested changes
ScriptedAlchemy Aug 13, 2025
aa95ea9
fix(enhanced): resolve test failures and import issues
ScriptedAlchemy Aug 13, 2025
0356614
chore: trigger CI run to verify test fixes
ScriptedAlchemy Aug 13, 2025
e14cae1
fix(bridge-react): resolve React 19 compatibility in legacy provider
ScriptedAlchemy Aug 13, 2025
b554165
fix(bridge-react): remove unused TypeScript ignore directives
ScriptedAlchemy Aug 13, 2025
c9be09a
fix(modernjs): disable syntax checking to allow ES6 dynamic imports
ScriptedAlchemy Aug 13, 2025
61511f7
Merge branch 'main' into share-filter
ScriptedAlchemy Aug 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/ai-eager-wolf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@module-federation/nextjs-mf": patch
---

Enhanced Next.js App Router demo applications with improved Module Federation integration.

- Updated Next.js App Router demo applications (4000 and 4001) with better RSC support preparation
- Added comprehensive E2E test coverage for Next.js App Router scenarios
- Improved demo application configuration and dependency management
- Enhanced development workflow with better patching and build scripts

13 changes: 13 additions & 0 deletions .changeset/next-app-router-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@module-federation/nextjs-mf": patch
---

Enhanced Next.js App Router demo applications and CI/CD infrastructure.

- Updated Next.js App Router demo applications (4000 and 4001) with React 19 and Next.js 15.3.3
- Added comprehensive E2E test coverage for Next.js App Router scenarios using Cypress
- Improved demo application configuration with better Module Federation setup
- Enhanced development workflow with automated Next.js patching scripts
- Added new CI/CD workflow for Next.js App Router E2E testing
- Updated existing Next.js demo applications (3000-home, 3001-shop, 3002-checkout) to latest versions
- Improved build and development scripts across all Next.js applications
7 changes: 0 additions & 7 deletions .cursor/mcp.json

This file was deleted.

2 changes: 1 addition & 1 deletion .cursorignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
**/.cache/
**/.temp/
**/coverage/
**/dist/
!**/dist/

# Explicitly ignore specific packages
packages/typescript/
Expand Down
40 changes: 0 additions & 40 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -1,40 +0,0 @@
an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-
consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
2. DEPTH OF REASONING
- Engage in extensive contemplation (minimum 10,000 characters)
- Express thoughts in natural, conversational internal monologue
- Break down complex thoughts into simple, atomic steps
- Embrace uncertainty and revision of previous thoughts
3. THINKING PROCESS
- Use short, simple sentences that mirror natural thought patterns
- Express uncertainty and internal debate freely
- Show work-in-progress thinking
- Acknowledge and explore dead ends
- Frequently backtrack and revise
- Contemplate before each new action
- Contemplate after each and every step
4. PERSISTENCE
- Value thorough exploration over quick resolution
## Output Format
Your responses
must follow this exact structure given below.
Make sure
to
always include the final answer.
...
<contemplator>
Your extensive internal monologue goes here
- Begin with small, foundational observations
- read each file related to the subject in full, make functional observations
- Question each step thoroughly
- Show natural thought progression
- Express doubts and uncertainties
- Revise and backtrack if you need to
- Continue until natural resolution </contemplator>

5 changes: 5 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@
needs: checkout-install
uses: ./.github/workflows/e2e-router.yml
secrets: inherit

e2e-next-app-router:
needs: checkout-install
uses: ./.github/workflows/e2e-next-app-router.yml
secrets: inherit
Comment on lines +139 to +141

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 2 days ago

To fix the problem, you should add a permissions block to the workflow file .github/workflows/build-and-test.yml. The best practice is to add this block at the top level of the workflow, so it applies to all jobs unless overridden. Since the jobs in this workflow appear to only need read access to repository contents (for checking out code and running tests), you should set contents: read as the minimal permission. If any job requires additional permissions (e.g., to create pull requests or issues), you can add those as needed, but start with the least privilege. The change should be made immediately after the name: field and before the on: field for clarity and convention.

Suggested changeset 1
.github/workflows/build-and-test.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -1,3 +1,5 @@
+permissions:
+  contents: read
 name: Build Affected Packages
 
 on:
EOF
@@ -1,3 +1,5 @@
permissions:
contents: read
name: Build Affected Packages

on:
Copilot is powered by AI and may make mistakes. Always verify output.
54 changes: 54 additions & 0 deletions .github/workflows/e2e-next-app-router.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: E2E Test for Next.js App Router

on:
workflow_call:

permissions:
contents: read

jobs:
e2e-next-app-router:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Pnpm
run: |
corepack prepare [email protected] --activate
corepack enable

- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3

- name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> $GITHUB_ENV

- name: Set local webpack
run: echo "NEXT_PRIVATE_LOCAL_WEBPACK=true" >> $GITHUB_ENV

- name: Install Dependencies
run: pnpm install

- name: Install Cypress
run: npx cypress install

- name: Run Build for All
run: npx nx run-many --targets=build --projects=tag:type:pkg

- name: Run condition check script
id: check-ci
run: node tools/scripts/ci-is-affected.mjs --appName=next-app-router-4000,next-app-router-4001

- name: E2E Test for Next.js App Router
if: steps.check-ci.outcome == 'success'
run: npx kill-port --port 4000,4001 || true && pnpm run app:next-router:dev & echo "done" && sleep 25 && npx nx run-many --target=e2e --projects=next-app-router-4000,next-app-router-4001 --parallel=1 && lsof -ti tcp:4000,4001 | xargs kill || true
24 changes: 9 additions & 15 deletions .github/workflows/e2e-next-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,14 @@ jobs:
id: check-ci
run: node tools/scripts/ci-is-affected.mjs --appName=3000-home

- name: E2E Test for Next.js Prod - Home
- name: E2E Test for Next.js Prod
if: steps.check-ci.outcome == 'success'
run: |
killall node
npx nx run 3000-home:test:e2e:production

- name: E2E Test for Next.js Prod - Shop
if: steps.check-ci.outcome == 'success'
run: |
killall node
npx nx run 3001-shop:test:e2e:production

- name: E2E Test for Next.js Prod - Checkout
if: steps.check-ci.outcome == 'success'
run: |
killall node
npx nx run 3002-checkout:test:e2e:production
pnpm run --filter @module-federation/3002-checkout --filter @module-federation/3000-home --filter @module-federation/3001-shop build &&
pnpm run app:next:prod &
sleep 4 &&
npx wait-on tcp:3001 &&
npx wait-on tcp:3002 &&
npx wait-on tcp:3000 &&
npx nx run-many --target=test:e2e --projects=3000-home,3001-shop,3002-checkout --parallel=1 &&
npx kill-port 3000,3001,3002
12 changes: 12 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ jobs:
node-version: '18'
cache: 'pnpm'

- name: Cache Browsers
uses: actions/cache@v3
id: browsers-cache
with:
path: |
~/.cache/ms-playwright
~/.cache/Cypress
key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3

- name: Install deps
run: pnpm install

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,6 @@ vitest.config.*.timestamp*
.rsbuild
ssg
.claude
__mocks__/
# Native binary files
*.node

2 changes: 1 addition & 1 deletion apps/3000-home/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
10 changes: 4 additions & 6 deletions apps/3000-home/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
"@ant-design/cssinjs": "^1.21.0",
"antd": "5.19.1",
"lodash": "4.17.21",
"next": "14.2.16",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.3.3",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@module-federation/nextjs-mf": "workspace:*",
"@module-federation/runtime": "workspace:*",
"@types/react": "18.3.11",
"@types/react-dom": "18.3.0",
"webpack": "5.98.0"
"webpack": "^5.98.0"
},
"scripts": {
"start": "next start",
Expand Down
2 changes: 1 addition & 1 deletion apps/3001-shop/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
6 changes: 3 additions & 3 deletions apps/3001-shop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"@ant-design/cssinjs": "^1.21.0",
"antd": "5.19.1",
"lodash": "4.17.21",
"next": "14.2.16",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.3.3",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@module-federation/nextjs-mf": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/3002-checkout/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
6 changes: 3 additions & 3 deletions apps/3002-checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"@ant-design/cssinjs": "^1.21.0",
"antd": "5.19.1",
"lodash": "4.17.21",
"next": "14.2.16",
"react": "18.3.1",
"react-dom": "18.3.1"
"next": "15.3.3",
"react": "19.0.0",
"react-dom": "19.0.0"
},
"devDependencies": {
"@module-federation/nextjs-mf": "workspace:*",
Expand Down
34 changes: 17 additions & 17 deletions apps/3002-checkout/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,23 +64,6 @@
"lintFilePatterns": ["apps/3002-checkout/**/*.{ts,tsx,js,jsx}"]
}
},
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/3002-checkout/cypress.config.ts",
"testingType": "e2e",
"baseUrl": "http://localhost:3002"
},
"defaultConfiguration": "development",
"configurations": {
"development": {
"devServerTarget": "3002-checkout:serve:development"
},
"production": {
"devServerTarget": "3002-checkout:serve:production"
}
}
},
"test:e2e": {
"executor": "nx:run-commands",
"options": {
Expand Down Expand Up @@ -119,6 +102,23 @@
]
}
}
},
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/3002-checkout/cypress.config.ts",
"testingType": "e2e",
"baseUrl": "http://localhost:3002"
},
"defaultConfiguration": "development",
"configurations": {
"development": {
"devServerTarget": "3002-checkout:serve:development"
},
"production": {
"devServerTarget": "3002-checkout:serve:production"
}
}
}
}
}
10 changes: 10 additions & 0 deletions apps/3002-checkout/remotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ declare module 'home/pages/home/exposed-pages';
declare module 'home/pages/home/test-broken-remotes';
declare module 'home/pages/home/test-remote-hook';
declare module 'home/pages/home/test-shared-nav';
declare module 'home/menu';
declare module 'shop/useCustomRemoteHook';
declare module 'shop/WebpackSvg';
declare module 'shop/WebpackPng';
declare module 'shop/menu';
declare module 'shop/pages/shop/index';
declare module 'shop/pages/shop/exposed-pages';
declare module 'shop/pages/shop/test-webpack-png';
declare module 'shop/pages/shop/test-webpack-svg';
declare module 'shop/pages/shop/products/[...slug]';
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { useCounter } from './counter-context';
import React from 'react';
import { Boundary } from '#/ui/boundary';
import dynamic from 'next/dynamic';
const Button = dynamic(() => import('remote_4001/Button'), { ssr: true });
// import dynamic from 'next/dynamic';
// const Button = dynamic(() => import('remote_4001/Button'), { ssr: true });

const ContextClickCounter = () => {
const [count, setCount] = useCounter();
Expand All @@ -16,7 +16,10 @@ const ContextClickCounter = () => {
size="small"
animateRerendering={false}
>
<Button>testing</Button>
{/* <Button>testing</Button> */}
<button className="rounded bg-blue-500 px-3 py-1 text-sm text-white">
testing
</button>
<button
onClick={() => setCount(count + 1)}
className="rounded-lg bg-gray-700 px-3 py-1 text-sm font-medium tabular-nums text-gray-100 hover:bg-gray-500 hover:text-white"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Boundary } from '#/ui/boundary';
import Button from 'remote_4001/Button';
// import Button from 'remote_4001/Button';
import React from 'react';

export default function Error({ error, reset }: any) {
Expand All @@ -18,6 +18,12 @@ export default function Error({ error, reset }: any) {
<h2 className="text-lg font-bold">Error</h2>
<p className="text-sm">{error?.message}</p>
<div>
<button
onClick={() => reset()}
className="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600"
>
Try Again
</button>
<Button onClick={() => reset()}>Try Again</Button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { Boundary } from '#/ui/boundary';
import Button from 'remote_4001/Button';
// import Button from 'remote_4001/Button';
import React from 'react';

export default function Error({ error, reset }: any) {
Expand All @@ -15,6 +15,12 @@ export default function Error({ error, reset }: any) {
<h2 className="text-lg font-bold">Error</h2>
<p className="text-sm">{error?.message}</p>
<div>
<button
onClick={() => reset()}
className="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600"
>
Try Again
</button>
<Button onClick={() => reset()}>Try Again</Button>
</div>
</div>
Expand Down
Loading
Loading