In this repository, we are working on single spa microfrontends implementation (React, Vue and Angular).
- https://youtu.be/pp7feFgUn9U?feature=shared (Microfrontends Basics, Single SPA basics, created first app with root config and react microfrontends)
- https://youtu.be/3j1j9oN1T58?feature=shared (Vue js integration using Single SPA)
- (Angular integration using Single SPA)
- Install create-single-spa package globally from official website.
- Create your root config file
- Use create-signle-spa command and select "create root config" option.
- Go to your root config project and run application (npm install)
- It will run your application on specified port. Mostly you will see Welcome page.
- Use "create-single-spa" command and select app type as "application/parcel".
- Go to created folder and do npm install.
- Start your application with "start:standalone" command (Check package.json)
- It will run your application.
- Use "create-single-spa" command and select app type as "application/parcel".
- We might face issue of security node js patches (Please see my youtube video for same)
- It will install vue cli and presets
- Go to created folder and do npm install.
- Start your application with "npm start" command (Check package.json)
- It will run your application.
- To run application in standalone mode, we need webpack configraution changes.
- Look for special js file in child MFE (Go to network tab and see file with name "organisation-name-project-name.js)
- Copy path of that file and add in import-map in root application (src/index.ejs) as key value pair.
- Example - "@frontenddevs/react-mfe": "http://localhost:8081/frontenddevs-react-mfe.js"
- You will get above key from child app package.json file (name) or its simple @organisation-name/project-name.
- Finally add this key in "*-layout.html" file in same folder under "application" element with name attribute.
- Example - <application name="@frontenddevs/react-mfe"></application>