├── website ├── static │ ├── .nojekyll │ ├── CNAME │ └── img │ │ ├── favicon.ico │ │ ├── tutorial │ │ ├── localeDropdown.png │ │ └── docsVersionDropdown.png │ │ └── logo.svg ├── docs │ ├── tutorial-basics │ │ ├── create-app.md │ │ └── _category_.json │ ├── tutorial-extras │ │ ├── version-control.md │ │ └── _category_.json │ └── intro.md ├── babel.config.js ├── src │ ├── pages │ │ ├── markdown-page.md │ │ ├── index.module.css │ │ └── index.js │ ├── components │ │ ├── HomepageFeatures.module.css │ │ └── HomepageFeatures.js │ └── css │ │ └── custom.css ├── .gitignore ├── sidebars.js ├── README.md ├── package.json └── docusaurus.config.js ├── .eslintignore ├── packages ├── fronts │ ├── index.ts │ ├── test │ │ └── index.test.ts │ ├── src │ │ ├── getAppName.ts │ │ ├── constants.ts │ │ ├── getUid.ts │ │ ├── loadApp.ts │ │ ├── getMeta.ts │ │ ├── unmount.ts │ │ ├── injectDependencies.ts │ │ ├── index.ts │ │ ├── injectScript.ts │ │ ├── cache.ts │ │ ├── boot.ts │ │ ├── loadScript.ts │ │ ├── injectStyle.ts │ │ ├── useApp.ts │ │ ├── useIframe.ts │ │ ├── interface.ts │ │ ├── useWebComponents.ts │ │ └── importApp.ts │ ├── README.md │ └── package.json ├── fronts-react │ ├── index.ts │ ├── test │ │ └── index.test.ts │ ├── src │ │ ├── index.ts │ │ ├── useIframe.tsx │ │ ├── interface.ts │ │ ├── useApp.tsx │ │ └── useWebComponents.tsx │ ├── README.md │ └── package.json ├── fronts-test │ ├── index.ts │ ├── src │ │ ├── index.ts │ │ ├── context.ts │ │ └── runner.ts │ ├── README.md │ └── package.json ├── fronts-vue │ ├── index.ts │ ├── test │ │ └── index.test.ts │ ├── src │ │ ├── useApp.tsx │ │ ├── useIframe.tsx │ │ ├── useWebComponents.tsx │ │ ├── index.ts │ │ └── interface.ts │ ├── README.md │ └── package.json ├── fronts-bundler │ ├── index.ts │ ├── test │ │ └── index.test.ts │ ├── src │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── utils.ts │ │ ├── getSiteConfig.ts │ │ ├── createWebpackConfig.ts │ │ ├── interface.ts │ │ └── insertStyle.ts │ ├── README.md │ └── package.json └── fronts-transport │ ├── index.ts │ ├── src │ ├── index.ts │ ├── postMessage.ts │ └── globalTransport.ts │ ├── README.md │ └── package.json ├── examples ├── all-features │ ├── app5 │ │ ├── index.html │ │ ├── src │ │ │ ├── bootstrap.js │ │ │ ├── main.js │ │ │ └── Layout.js │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app6 │ │ ├── index.html │ │ ├── site.json │ │ ├── src │ │ │ ├── logo.png │ │ │ ├── components │ │ │ │ └── Button.js │ │ │ ├── main.js │ │ │ └── App.js │ │ ├── package.json │ │ └── webpack.config.js │ ├── app1 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── bootstrap.tsx │ │ │ ├── Navigation.tsx │ │ │ ├── HomePage.tsx │ │ │ └── App.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app2 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── ButtonContainer.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.dev.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app3 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── site.json │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app4 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── site.json │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── lerna.json │ └── package.json ├── basic │ ├── app1 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── Navigation.tsx │ │ │ ├── bootstrap.tsx │ │ │ ├── HomePage.tsx │ │ │ └── App.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app2 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── ButtonContainer.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app3 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── site.json │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app4 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── lerna.json │ └── package.json ├── version-control │ ├── app1 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── Navigation.tsx │ │ │ ├── bootstrap.tsx │ │ │ ├── HomePage.tsx │ │ │ └── App.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app2 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── ButtonContainer.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app3 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── styles.css │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── site.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── lerna.json │ ├── registry │ │ ├── api │ │ │ └── dev.json │ │ └── package.json │ └── package.json ├── non-module-federation │ ├── app1 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── Navigation.tsx │ │ │ ├── bootstrap.tsx │ │ │ ├── HomePage.tsx │ │ │ └── App.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app2 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── ButtonContainer.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── app3 │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── App.tsx │ │ │ ├── bootstrap.tsx │ │ │ └── Button.tsx │ │ ├── public │ │ │ └── index.html │ │ ├── tsconfig.json │ │ ├── package.json │ │ └── webpack.config.js │ ├── lerna.json │ └── package.json └── vite-react-simple │ ├── webpack-spa │ ├── src │ │ ├── index.js │ │ ├── bootstrap.js │ │ ├── Button.js │ │ └── App.js │ ├── .gitignore │ ├── package.json │ ├── index.html │ └── webpack.config.js │ ├── rs-sidecart │ ├── src │ │ ├── index.js │ │ └── Header.jsx │ ├── .babelrc │ ├── package.json │ ├── webpack.config.js │ └── .gitignore │ ├── vite-react │ ├── src │ │ ├── vite-env.d.ts │ │ ├── types │ │ │ └── fr.d.ts │ │ ├── main.tsx │ │ ├── index.css │ │ ├── App.css │ │ ├── App.tsx │ │ ├── favicon.svg │ │ ├── logo.svg │ │ └── index.js │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ ├── index.html │ ├── plugins │ │ └── vite-plugin-transform-html.js │ ├── vite.config.ts │ └── serve.js │ └── README.md ├── .prettierrc ├── lerna.json ├── .vscode └── settings.json ├── scripts ├── jest │ ├── dev.config.json │ └── prod.config.json ├── workspaces.ts ├── build.ts ├── rollup.ts └── typescript.ts ├── .editorconfig ├── .github └── workflows │ ├── npm-publish.yml │ └── nodejs.yml ├── docs └── TODO.md ├── .eslintrc ├── LICENSE ├── .gitignore ├── global.d.ts ├── logo.svg └── package.json /website/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/static/CNAME: -------------------------------------------------------------------------------- 1 | fronts.js.org 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | examples 3 | -------------------------------------------------------------------------------- /packages/fronts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /packages/fronts-react/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /packages/fronts-test/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /packages/fronts-vue/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /examples/all-features/app5/index.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /examples/all-features/app6/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/basic/app1/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/basic/app2/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/basic/app3/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/basic/app4/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /packages/fronts-bundler/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /packages/fronts-transport/index.ts: -------------------------------------------------------------------------------- 1 | export * from './src'; 2 | -------------------------------------------------------------------------------- /examples/all-features/app1/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/all-features/app2/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/all-features/app3/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/all-features/app4/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/all-features/app5/src/bootstrap.js: -------------------------------------------------------------------------------- 1 | import("./main.js"); 2 | -------------------------------------------------------------------------------- /examples/version-control/app1/src/index.ts: -------------------------------------------------------------------------------- 1 | import("./bootstrap"); 2 | -------------------------------------------------------------------------------- /examples/version-control/app2/src/index.ts: -------------------------------------------------------------------------------- 1 | import("./bootstrap"); 2 | -------------------------------------------------------------------------------- /examples/version-control/app3/src/index.ts: -------------------------------------------------------------------------------- 1 | import("./bootstrap"); 2 | -------------------------------------------------------------------------------- /packages/fronts/test/index.test.ts: -------------------------------------------------------------------------------- 1 | test("", () => { 2 | // 3 | }); 4 | -------------------------------------------------------------------------------- /examples/non-module-federation/app1/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/non-module-federation/app2/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/non-module-federation/app3/src/index.ts: -------------------------------------------------------------------------------- 1 | import('./bootstrap'); 2 | -------------------------------------------------------------------------------- /examples/vite-react-simple/webpack-spa/src/index.js: -------------------------------------------------------------------------------- 1 | import("./bootstrap"); 2 | -------------------------------------------------------------------------------- /packages/fronts-react/test/index.test.ts: -------------------------------------------------------------------------------- 1 | test('', () => { 2 | // 3 | }); 4 | -------------------------------------------------------------------------------- /packages/fronts-vue/test/index.test.ts: -------------------------------------------------------------------------------- 1 | test('', () => { 2 | // 3 | }); 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "es5" 4 | } 5 | -------------------------------------------------------------------------------- /examples/version-control/app3/src/styles.css: -------------------------------------------------------------------------------- 1 | .button { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /examples/vite-react-simple/rs-sidecart/src/index.js: -------------------------------------------------------------------------------- 1 | export default () => true; 2 | -------------------------------------------------------------------------------- /packages/fronts-bundler/test/index.test.ts: -------------------------------------------------------------------------------- 1 | test('', () => { 2 | // 3 | }); 4 | -------------------------------------------------------------------------------- /packages/fronts-bundler/src/constants.ts: -------------------------------------------------------------------------------- 1 | export const identifier = '__FRONTS__'; 2 | -------------------------------------------------------------------------------- /packages/fronts/src/getAppName.ts: -------------------------------------------------------------------------------- 1 | export const getAppName = () => process.env.APP_NAME; 2 | -------------------------------------------------------------------------------- /examples/vite-react-simple/vite-react/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | ///15 | a page being provided by App 1 16 |
17 |15 | a page being provided by App 1 16 |
17 |15 | a page being provided by App 1 16 |
17 |15 | a page being provided by App 1 16 |
17 |{siteConfig.tagline}
16 |Hello Vite + federation! +1+2+3+4
15 |20 | 23 |
24 |
25 | Edit App.tsx and save to test HMR updates.
26 |
28 | 34 | Learn React 35 | 36 | {" | "} 37 | 43 | Vite Docs 44 | 45 |
46 |site.json, similar to package.json of NPM.
12 | >
13 | ),
14 | },
15 | {
16 | title: 'Progressive',
17 | Svg: require('../../static/img/undraw_docusaurus_tree.svg').default,
18 | description: (
19 | <>
20 | It supports non-module-federation and allows gradual upgrade to support module federation and enable version control system.
21 | >
22 | ),
23 | },
24 | {
25 | title: 'Concise & Diversity',
26 | Svg: require('../../static/img/undraw_docusaurus_react.svg').default,
27 | description: (
28 | <>
29 | Provide clean API and support more micro frontends combination capability and provide re-architecture possibilities.
30 | >
31 | ),
32 | },
33 | ];
34 |
35 | function Feature({Svg, title, description}) {
36 | return (
37 | {description}
44 | = (target: NodeElement, props?: P) => () => void;
5 |
6 | export type DynamicImport
76 |
77 | Inline as React Component example
78 |
80 |
81 | useApp example
82 |
83 |
84 |
85 | useAppWithReact example
86 |
88 |
89 | useWebComponent example
90 |
91 |
92 |
93 | useWebComponentWithReact example
94 |
96 |
97 | useIframe example
98 |
99 |
100 |
101 | useIframeWithReact example
102 | useApp example
85 |
86 | useAppWithReact example
87 | useWebComponentsWithReact example
89 | App 1
101 |