Module Federation shared components
Some components can be used by the Educator applicatiosn and by the Student Application. These components belong in this library.
Components only used by the Educator application should be in mps.ui.educator-component-library Components only used by the Student Appication should be in the ux-component-library in the Student application
Install dependancies
npm i
Run the application locally
npm start
The mps.ui.shared-components is imported as a module federation remote
in webpack.config
plugins: [
new ModuleFederationPlugin({
name: "mps_ui_shared_components",
filename: "remoteEntry.js",
remotes: {
"@imaginelearning/mps_ui_shared_components": "mps_ui_shared_components@http://localhost:3030/remoteEntry.js"
},
exposes: {
"./FeatureFlagProvider": "./src/usefeatureflag/featureflagprovider",
"./useFeatureFlag": "./src/usefeatureflag/usefeatureflag",
"./useLocalStorage": "./src/uselocalstorage/uselocalstorage",
}
})
]