Skip to content

docs(website-new): align Vite MF config with Rspack pattern#4752

Open
tonoizer wants to merge 3 commits into
module-federation:mainfrom
tonoizer:docs/vite-createModuleFederationConfig
Open

docs(website-new): align Vite MF config with Rspack pattern#4752
tonoizer wants to merge 3 commits into
module-federation:mainfrom
tonoizer:docs/vite-createModuleFederationConfig

Conversation

@tonoizer
Copy link
Copy Markdown

Align Vite integration docs with the Rspack pattern by moving federation options into module-federation.config.ts with createModuleFederationConfig.

Description

Updates the official Vite integration docs (EN + ZH) to match how Rspack is documented:

  • Add a Create module-federation.config.ts step that uses createModuleFederationConfig from @module-federation/vite
  • Move the existing inline federation({ ... }) options into that file (same name, manifest, remotes, exposes, and shared values as before)
  • Register the plugin in vite.config.js via federation(mfConfig) while keeping the rest of the Vite config unchanged (server, base, build.target, comments)
  • Keep the existing Configure the Build Plugin section and type reference

Shared snippets were added under apps/website-new/src/components/common/vite/ (create-config.mdx, register-plugin.mdx), consistent with the Rspack doc components.

Also fixes the ZH example where remotes was incorrectly placed at the root of module.exports instead of inside the federation config.

Related Issue

N/A — documentation alignment only.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

Validation

  • Docs-only change; no runtime or package code modified.
  • Pre-commit hooks passed locally (lint-fix, commitlint).
  • Website build not run (docs-only); recommend a quick preview of /integrations/build-tool/vite after merge if desired.

Align Vite integration docs with the Rspack pattern by moving federation
options into module-federation.config.ts with createModuleFederationConfig.

Co-authored-by: Cursor <cursoragent@cursor.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 22, 2026

⚠️ No Changeset found

Latest commit: e926f04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit e926f04
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/6a1af50a0a10840008d0532b
😎 Deploy Preview https://deploy-preview-4752--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@2heal1
Copy link
Copy Markdown
Member

2heal1 commented May 28, 2026

need to resolve conflict

tonoizer and others added 2 commits May 29, 2026 09:01
Keep the PR's component-based Vite docs (create-config + register-plugin)
instead of the inline federation() snippet from main.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants