You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+28-3
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,8 @@ This is a [single-spa](https://single-spa.js.org/) example React microapp.
18
18
|`npm start`| Run server which serves production ready build from `dist` folder |
19
19
|`npm run dev`| Run app in the `development` mode and `dev` config |
20
20
|`npm run dev-https`| Run app in the `development` mode and `dev` config using HTTPS protocol |
21
-
|`npm run local`| Run app in the `development` mode and `local-dev` config |
22
21
|`npm run prod`| Run app in the `development` mode and `prod` config |
23
-
|`npm run build`| Build app for production and puts files to the `dist` folder, default to `development` mode and `local-dev` config |
22
+
|`npm run build`| Build app for production and puts files to the `dist` folder, default to `development` mode and `dev` config |
24
23
|`npm run analyze`| Analyze dependencies sizes and opens report in the browser |
25
24
|`npm run lint`| Check code for lint errors |
26
25
|`npm run format`| Format code using prettier |
@@ -33,9 +32,35 @@ This is a [single-spa](https://single-spa.js.org/) example React microapp.
33
32
Inside the project folder run:
34
33
-`nvm use 10.22.1;` - to use npm version: 10.22.1
35
34
-`npm i` - install dependencies
36
-
-`npm run local` - run app in `development` mode and `local-dev` config
35
+
-`npm run dev` - run app in `development` mode and `dev` config, currently it is using the config from `default.js`
37
36
- As this app can be loaded only inside a frame single-spa, you have to run a `micro-frontends-frame` frame app and configure it to use the URL `http://localhost:8008/earn-app/topcoder-micro-frontends-earn-app.js`.
38
37
38
+
## Local Setup for adding a new MFE
39
+
1. The setup is assuming you have setup the `micro-frontends-frame` and `micro-frontends-nav-app`. And this is also assuming your have a new MFE named `another-app` and your local url is `http://localhost:8099/another-app/topcoder-micro-frontends-another-app.js`
40
+
41
+
2. You have launched existing `micro-frontends-challenges-app` and `micro-frontends-gigs-app` in your local envrionment.
42
+
43
+
3. Modify the `config/dev.js` by incorporating the module mapping, so it might be look like this if you setup all them in local environment:
4. In the `src/containers/Menu/index.jsx`, you can modify it to add your new `another-app` menu link, challenges-app and gigs-app menu links have already been setup as reference.
55
+
56
+
5. In the `set-public-path.js` file, add the mapping to your `another-app`, challenges-app and gigs-app have already been setup as the reference.
57
+
58
+
6. In the `src/App.jsx` file, add the application mount point inside the `<Router>` component, challenges-app and gigs-app have already been setup as the reference
59
+
60
+
7. Edit your `hosts` file by mapping `127.0.0.1 local.topcoder-dev.com`
61
+
62
+
8. Now visit `http://local.topcoder-dev.com:8080/earn/find/challenges` to view the `micro-frontends-challenges-app`
0 commit comments