A simple example migrated from Module Federation to Piral
⚡ This sample uses the simple example for Building Micro-Frontends to apply Piral. Compare for yourself.
You can visit this demo at swag-ecommerce.samples.piral.cloud/.
Just install the dependencies for each part. Start with the app shell:
cd appshell
npm i
npm run build
The last command is there to build the app shell. This will create an emulator, which will be useful for debugging. In a monorepo we would not need that. Also, we could leave out the emulator, but its good to have it for illustrative purposes.
Once done you can go into the pilets and resolve their dependencies individually, e.g., for accountdetails
:
cd pilets/accountdetails
npm i
Note that this repository does not use a monorepo to stay close to the original. Also, the app shell is not distributed via an npm registry, but rather as a tgz.
Piral and this sample code is released using the MIT license. For more information see the license file.