Skip to content

Amol-Bhole/module-federation-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cart SubApp

Is built using JavaScript, Html, Css, faker, Webpack.

Steps to start.
npm install.
npm start.

webpack.config.js

dev server is initialized on port 8082. ModuleFedrationPlugin exposes "./src/bootstrap" through cart's remoteEntry.js file. faker is declaired as singleton shared module, and in container if one or more subApps are using same module then only one instance will be loaded.

src/utils/mockContext.js

If cart subApp is run independently, then this mocked context will be used to enable functionalities on local.

src/index.js

Is dynamically importing bootstrap.js to allow webpack's ModuleFedrationPlugin to request dependencies asynchronously.

src/bootstrap.js

mount function is exposed to opther repos through ModuleFedrationPlugin. mount function accepts element and globalContext as arguments. If cart sub app is built independently then it calls mount function using element and mockContext.

Container repo

https://github.com/Amol-Bhole/module-federation-container

Cart SubApp Output

if Cart SubApp is run independently, output will be as below

alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published