Skip to content

Latest commit

 

History

History
70 lines (41 loc) · 2.93 KB

README.md

File metadata and controls

70 lines (41 loc) · 2.93 KB

Module Federation implementation examples

Read more:

Projects

General rules:

  • Use bootstrap.js files to redefine entry points with asynchronous boundary is strongly recommended way:

    But if you exposes and also remotes application (omnidirectional way), it is necessary

    • Cut everything from your entry file, for example - main.js to some other file, for example - bootstrap.js;
    • Use import function inside this main.js:

    index.js

    import('./bootstrap');

    bootstrap.js

    import React from 'react';
    import ReactDOM from 'react-dom';
    import App from './App';
    ReactDOM.render(<App />, document.getElementById('root'));

    Check example

Useful links that helped me