一键导入
micro-frontends
Implementing Module Federation for scaling frontend teams.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implementing Module Federation for scaling frontend teams.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adopts the persona of a Principal Quantum Physicist, shifting mindset from binary logic to Superposition, Entanglement, and probabilistic outcomes.
Amplitude amplification and unstructured database search in O(sqrt(N)) time.
Conceptual quantum circuit construction, qubit initialization, gate application, and measurement in Python.
Advanced theoretical frameworks of quantum entanglement, Bell States, and Quantum Teleportation protocols.
Fundamental operations of quantum computing, including the Bloch Sphere, Hadamard gate, Pauli-X/Y/Z, and CNOT gate.
Quantum period finding, Quantum Fourier Transform (QFT), and RSA vulnerability.
| name | Micro-Frontends |
| description | Implementing Module Federation for scaling frontend teams. |
graph TD
A[Host App Shell] --> B[Remote App 1: Auth]
A --> C[Remote App 2: Dashboard]
A --> D[Remote App 3: Checkout]
B -.-> E[Shared Libs e.g. React]
C -.-> E
D -.-> E
// webpack.config.js (Host)
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
module.exports = {
plugins: [
new ModuleFederationPlugin({
name: 'host',
remotes: {
app1: 'app1@http://localhost:3001/remoteEntry.js',
},
shared: { react: { singleton: true }, 'react-dom': { singleton: true } },
}),
],
};
import React, { Suspense } from 'react';
// Dynamically import the remote component
const RemoteButton = React.lazy(() => import('app1/Button'));
export default function App() {
return (
<div>
<h1>Host Application</h1>
<Suspense fallback={<div>Loading Remote Button...</div>}>
<RemoteButton />
</Suspense>
</div>
);
}