https://github.com/sasoria/microfrontends-demo
Server-side composition of microfrontends
https://github.com/sasoria/microfrontends-demo
microfrontends podium skypack snowpack
Last synced: 10 months ago
JSON representation
Server-side composition of microfrontends
- Host: GitHub
- URL: https://github.com/sasoria/microfrontends-demo
- Owner: sasoria
- License: mit
- Created: 2021-04-11T10:55:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-22T09:26:14.000Z (almost 5 years ago)
- Last Synced: 2023-03-10T00:37:09.969Z (over 3 years ago)
- Topics: microfrontends, podium, skypack, snowpack
- Language: JavaScript
- Homepage:
- Size: 432 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microfrontends-demo
A demo of microfrontends. This demo uses [Podium](https://podium-lib.io/), a microfrontend framework that's made and maintained by [FINN.no](https://github.com/finn-no).
## Layout
The Layout server has the single responsibility of composing microfrontends. It does so by setting up contracts between it and other microservices. One can start it with the following script:
```bash
$ npm run layout
```
## Podlets
Podlet is Podium's term for microfrontends and each one in this demo is written in Javascript. [Snowpack](https://www.snowpack.dev/) is used for development mode and it bundles for production to EcmaScript Modules (ESM) using [ESbuild](https://esbuild.github.io/).
```bash
$ npm run podlet
```
## Shared dependencies
Each podlet shares react dependencies through absolute ESM imports that are cached in the browser. They fetch both react and react-dom from [Skypack](https://www.skypack.dev/), thus reducing the bundle size considerably.