Skip to content

Files

Latest commit

Nov 14, 2024
908450d · Nov 14, 2024

History

History

typescript-react-monorepo

README.md

TypeScript-react-monorepo Example

This example demos a basic host/remote application with TypeScript and also streams types.

Installation

npm install --global yarn
yarn

Running Demo

Run pnpm run start in root folder. This will build and serve both host and app1, app2 on ports 4000 and 3000,3001 respectively.

FederationConfig

  • For more settings, you can access federationConfig from path packages/[host or remote]/configs/federationConfig.js
  • Use the .env file in the host project to change the remote address

Tip

  • Monorepo is used for ease of use. But there is no requirement to use it.
  • This project demonstrates the functionality of @module-federation/typescript. To read more, you can refer to the documentation of this package.