Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
originjs
vite-plugin-federation
Repository navigation
Code
Issues
219
(219)
Pull requests
17
(17)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
More
items
Home
Jump to bottom
Adolph-WSY edited this page
Sep 6, 2021
·
9 revisions
Vite Module Federation
背景知识
Webpack Module Federation
Webpack 5 Module Federation: JavaScript 架构的变革者
三大应用场景调研,Webpack 新功能 Module Federation 深入解析
Webpack5 跨应用代码共享 - Module Federation
基本概念
Remote: 远程模块不属于当前构建,在运行时从所谓的容器加载。
Host:消费其他 Remote 的本地模块。
Shared: 共享模块是指既可重写的又可作为向嵌套容器提供重写的模块。它们通常指向每个构建中的相同模块,例如相同的库。
实现方案
Remote端暴露模块
Host端消费Remote模块
Shared共享
CSS 样式模块
Wiki pages
Pages
6
Loading
Home
Vite Module Federation
背景知识
基本概念
实现方案
Loading
Css
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Host
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Remote
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Shared
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
shared [deprecated]
Uh oh!
There was an error while loading.
Please reload this page
.
Clone this wiki locally
You can’t perform that action at this time.