Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0755bc1
chore: switch pnpm to isolated node_modules (remove node-linker=hoisted)
ScriptedAlchemy Feb 2, 2026
672ffeb
chore: gitignore build artifacts (mf-manifest, compiled output)
ScriptedAlchemy Feb 2, 2026
7872f46
fix: resolve 3 pre-existing e2e test failures in newly added workspac…
ScriptedAlchemy Feb 2, 2026
c394b4b
fix: resolve remaining e2e failures for react-in-vue and nextjs-dynam…
ScriptedAlchemy Feb 2, 2026
17f74f6
fix(react-livereload): replace external-remotes-plugin with hardcoded…
ScriptedAlchemy Feb 2, 2026
dfcc2ba
ci: re-trigger after stuck runner
ScriptedAlchemy Feb 2, 2026
7600245
fix(server-side-render-only): prevent test hang by managing server li…
ScriptedAlchemy Feb 2, 2026
2088927
fix(server-side-render-only): remove e2e:ci script to prevent CI hang
ScriptedAlchemy Feb 2, 2026
19c7b74
ci: re-enable corepack after setup-node, bump rsbuild/rspack plugins
ScriptedAlchemy Feb 2, 2026
c9db908
ci: speed up forked_master_status by using GitHub API instead of full…
ScriptedAlchemy Feb 2, 2026
6b4b69d
style: run prettier on entire repo
ScriptedAlchemy Feb 2, 2026
f190b53
ci: add missing corepack re-enable in run-e2e-test job
ScriptedAlchemy Feb 2, 2026
d64634f
ci: remove free disk space steps from CI workflows
ScriptedAlchemy Feb 2, 2026
d42bd90
ci: use shallow clone instead of full history in setup-matrix and cac…
ScriptedAlchemy Feb 2, 2026
ce008d7
chore: remove redundant preinstall from remotes-monorepo
ScriptedAlchemy Feb 2, 2026
8b5363c
fix: address CodeQL findings from PR review
ScriptedAlchemy Feb 2, 2026
5ee4a66
ci: add 45-minute job timeout to e2e test matrix jobs
ScriptedAlchemy Feb 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .claude/agents/module-federation-example-enhancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Your primary resource is the Module Federation documentation at https://module-f
1. **Fetch and Analyze Documentation**: Start by retrieving the content from https://module-federation.io/llms.txt to understand the current documentation structure. Identify relevant markdown files and sublinks that contain information about the latest Module Federation features, APIs, and patterns.

2. **Deep Dive into Module Federation Specifics**: Based on the example you're improving, explore specific documentation sections about:

- Module Federation configuration options and APIs
- Latest @module-federation/enhanced features
- Federation-specific patterns and best practices
Expand All @@ -19,12 +20,14 @@ Your primary resource is the Module Federation documentation at https://module-f
- Shared dependency optimization

3. **Analyze the Existing Module Federation Implementation**: Carefully examine the provided code to:

- Identify outdated Module Federation patterns or deprecated APIs
- Spot opportunities for Module Federation-specific optimizations
- Recognize missing Module Federation features that could enhance functionality
- Assess the federation architecture for improvement potential

4. **Apply Module Federation Enhancements**: Transform the example by:

- Upgrading to @module-federation/enhanced if using legacy webpack plugin
- Implementing modern Module Federation configuration patterns
- Adding federation-specific runtime plugins where beneficial
Expand All @@ -33,6 +36,7 @@ Your primary resource is the Module Federation documentation at https://module-f
- Updating to current Module Federation APIs and patterns

5. **Focus Areas (DO enhance):**

- Module Federation configuration files (webpack.config.js, rspack.config.js)
- Federation-specific source code patterns
- Remote loading and consumption patterns
Expand All @@ -42,6 +46,7 @@ Your primary resource is the Module Federation documentation at https://module-f
- Module Federation hooks and utilities

6. **Avoid Areas (DO NOT enhance unless directly related to Module Federation):**

- General webpack performance optimizations unrelated to federation
- Security hardening not specific to Module Federation
- Docker configurations and deployment concerns
Expand Down
28 changes: 17 additions & 11 deletions .claude/agents/readme-updater.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ You are an expert technical documentation specialist with deep expertise in anal
When analyzing a project, you will:

1. **Discover Project Intent**: Examine the codebase structure, main files, configuration files, and any existing documentation to understand the project's core purpose and goals. Look for:

- Main entry points and primary functionality
- Package dependencies that hint at the project's nature
- Comments and docstrings that explain intent
- File and folder naming patterns

2. **Understand How It Works**: Analyze the technical implementation by:

- Identifying the main components and their interactions
- Tracing the flow of data and control through the application
- Recognizing design patterns and architectural decisions
- Understanding external dependencies and integrations

3. **Identify Use Cases**: Determine practical applications by:

- Analyzing functionality to infer intended users and scenarios
- Looking for example files or test cases that demonstrate usage
- Considering the problem domain the project addresses
- Identifying both primary and secondary use cases

4. **Document Setup and Execution**: Extract or infer:

- Required dependencies and prerequisites
- Installation steps
- Configuration requirements
Expand All @@ -38,19 +42,20 @@ When analyzing a project, you will:
- If multiple directories are mentioned, check each for README files
- Preserve any valuable existing content while updating outdated information
- Structure the README with clear sections including:
* Project title and brief description
* Purpose and intent
* Key features
* How it works (high-level architecture)
* Use cases with examples
* Prerequisites
* Installation instructions
* Usage instructions with examples
* Configuration options (if applicable)
* Contributing guidelines (if found in the project)
* License information (if found)
- Project title and brief description
- Purpose and intent
- Key features
- How it works (high-level architecture)
- Use cases with examples
- Prerequisites
- Installation instructions
- Usage instructions with examples
- Configuration options (if applicable)
- Contributing guidelines (if found in the project)
- License information (if found)

Best practices you follow:

- Write in clear, concise language accessible to your target audience
- Use markdown formatting effectively (headers, code blocks, lists)
- Include code examples and command-line snippets in code blocks
Expand All @@ -60,6 +65,7 @@ Best practices you follow:
- Update only what needs updating - preserve valuable existing content

When you cannot determine certain information:

- Make reasonable inferences based on common patterns
- Clearly mark sections that may need manual verification with comments like `<!-- TODO: Verify this section -->`
- Provide template sections for information you cannot extract
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
category: '/language:${{matrix.language}}'
97 changes: 27 additions & 70 deletions .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
FILES_TO_DELETE: |
sudo rm -rf "/usr/share/dotnet"
sudo rm -rf "/usr/share/swift"
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "/usr/local/lib/android/sdk"
sudo rm -rf "/opt/hostedtoolcache/Python"
sudo rm -rf "/opt/hostedtoolcache/go"
sudo rm -rf "/opt/hostedtoolcache/CodeQL"
sudo rm -rf "/var/lib/gems"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean -y
sudo apt-get autoremove -y

jobs:
# Stop previous runs
stop-previous-run:
Expand Down Expand Up @@ -57,32 +41,23 @@ jobs:
runs-on: ubuntu-22.04
needs: stop-previous-run
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Check if forked master is up to date
id: check-forked-master
if: github.repository_owner == 'module-federation'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${{ github.repository_owner }}"
git remote add base https://github.com/${{github.repository}}
git remote -v
git fetch --all
export FORKED_MASTER_SHA=$(git log -n 1 --pretty=format:"%H" origin/${{ github.event.pull_request.base.ref}})
export BASE_MASTER_SHA=$(git log -n 1 --pretty=format:"%H" base/${{ github.event.pull_request.base.ref }})
echo "$FORKED_MASTER_SHA"
echo "$BASE_MASTER_SHA"

if [ "$FORKED_MASTER_SHA" == "$BASE_MASTER_SHA" ];
then
BASE_REF="${{ github.event.pull_request.base.ref }}"
FORK_REPO="${{ github.event.pull_request.head.repo.full_name }}"
BASE_REPO="${{ github.repository }}"

FORKED_SHA=$(gh api "repos/${FORK_REPO}/commits/${BASE_REF}" --jq '.sha')
BASE_SHA=$(gh api "repos/${BASE_REPO}/commits/${BASE_REF}" --jq '.sha')

echo "Fork SHA: $FORKED_SHA"
echo "Base SHA: $BASE_SHA"

if [ "$FORKED_SHA" == "$BASE_SHA" ]; then
echo "The forked master is up to date with the base master branch"
exit 0
else
echo "The forked master branch is not up to date with the base master branch, Please update your fork!"
exit 1
Expand All @@ -101,18 +76,10 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
fetch-depth: 1

- name: Free disk space
shell: bash
run: |
echo "Freeing disk space on runner..."
while IFS= read -r cmd; do
[ -z "$cmd" ] && continue
echo ">> $cmd"
bash -lc "$cmd" || true
done <<< "$FILES_TO_DELETE"
df -h
- name: Fetch origin/master for diff
run: git fetch origin master --depth=1

- name: Get Playwright version
id: playwright-version
Expand All @@ -122,11 +89,8 @@ jobs:
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Enable corepack
run: corepack enable

- name: Setup Node.js with caching
uses: actions/setup-node@v4
Comment thread
ScriptedAlchemy marked this conversation as resolved.
Expand All @@ -135,6 +99,9 @@ jobs:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Re-enable corepack after setup-node
run: corepack enable

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
Expand Down Expand Up @@ -184,6 +151,7 @@ jobs:
needs: [setup-matrix]
if: ${{ needs.setup-matrix.outputs.matrix != '{"container":[]}' }}
runs-on: ubuntu-22.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
Expand All @@ -196,29 +164,15 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1

- name: Free disk space
shell: bash
run: |
echo "Freeing disk space on runner..."
while IFS= read -r cmd; do
[ -z "$cmd" ] && continue
echo ">> $cmd"
bash -lc "$cmd" || true
done <<< "$FILES_TO_DELETE"
df -h

- name: Get Playwright version
id: playwright-version
shell: bash
run: |
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Enable corepack
run: corepack enable

- name: Setup Node.js with caching
id: setup-node
Expand All @@ -228,6 +182,9 @@ jobs:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Re-enable corepack after setup-node
run: corepack enable

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
Expand Down
35 changes: 7 additions & 28 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FILES_TO_DELETE: |
sudo rm -rf "/usr/share/dotnet"
sudo rm -rf "/usr/share/swift"
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "/usr/local/lib/android/sdk"
sudo rm -rf "/opt/hostedtoolcache/Python"
sudo rm -rf "/opt/hostedtoolcache/go"
sudo rm -rf "/opt/hostedtoolcache/CodeQL"
sudo rm -rf "/var/lib/gems"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo apt-get clean -y
sudo apt-get autoremove -y

jobs:
# Stop previous runs
stop-previous-run:
Expand All @@ -44,9 +28,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
fetch-depth: 1

- name: Get Playwright version
id: playwright-version
Expand All @@ -55,21 +37,15 @@ jobs:
version="$(node -p "String(require('./package.json').devDependencies['@playwright/test']||'').replace(/^[^0-9]*/, '')")"
echo "version=$version" >> "$GITHUB_OUTPUT"

- name: Free up some space
run: ${{ env.FILES_TO_DELETE }}

# Hash pnpm-lock.yaml files to use it as a cache key, if pnpm-lock.yaml files are changed, the cache will be invalidated
- name: Check pnpm hash
id: yarn-hash
run: |
yarnHash="$(npx hash-files -f '["**/pnpm-lock.yaml"]' -a sha256)"
echo "yarnHash=$yarnHash" >> $GITHUB_OUTPUT

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false
- name: Enable corepack
run: corepack enable

- name: Setup Node.js with caching
uses: actions/setup-node@v4
Comment thread
ScriptedAlchemy marked this conversation as resolved.
Expand All @@ -78,6 +54,9 @@ jobs:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Re-enable corepack after setup-node
run: corepack enable

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
Expand All @@ -99,7 +78,7 @@ jobs:
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}-headless-shell

- name: Set Playwright cache status
run: echo "PLAYWRIGHT_CACHE_HIT=${{ steps.playwright-cache.outputs.cache-hit }}" >> $GITHUB_ENV

Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,15 @@ buildServer
/comprehensive-demo-react*/**/public/*.css
*.map

# Module Federation build outputs
**/mf-manifest.json
**/mf-stats.json
**/.__mf__temp/

# react-sharedworker build output
/react-sharedworker/host/build/
/react-sharedworker/module/build/

# Server-side-render-only compiled output
/server-side-render-only/**/public/server/

5 changes: 1 addition & 4 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
child-concurrency=8
registry=https://registry.npmjs.org/

# Use a hoisted node_modules layout to reduce Webpack/Rspack resolution issues
# caused by pnpm's content-addressable store + symlinked dependency graph.
node-linker=hoisted
strict-peer-dependencies=false
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "0.2.0",
"configurations": []
}
"version": "0.2.0",
"configurations": []
}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ This repository is to showcase examples of how Webpack 5's new Module Federation
- Module federation enhances collections: [Universe](https://github.com/module-federation/universe)
- Module Federation Docs: [Module Federation Docs](https://module-federation.io/)



## List of Examples

Click here to see the detailed list of examples in this repo [Full Examples List](./output.md)
Expand Down
Loading
Loading