Skip to content

waldronmatt/module-federation-boilerplate

Repository files navigation

Module Federation Boilerplate

Host App

Host App Netlify Status

Remote App

Remote App Netlify Status

A dynamic, multi-environment module federation boilerplate.

Features

  • Multi-environment support using NormalModuleReplacementPlugin
  • Loads remote apps dynamically
  • Uses my shareable configs to reduce boilerplate
  • ~100% Lighthouse Score

Installation

Install package dependencies and link local packages together:

yarn

Install hooks:

yarn prepare

Getting Started

Run dev environment for host and remote:

yarn dev

Build and serve host and remote for Netlify:

yarn build

Note: Configure script in Netlify to auto-run via push to main branch.

Build host and remote for Express:

yarn prod

Serve host and remote for Express:

yarn serve

Commands

Commit changes using conventional changelog:

yarn commit

Lint host and remote files:

yarn lint

Note: release.yml will run this before versioning and publishing.

License

MIT