{"id":31013976,"url":"https://github.com/mirian97/microfronted-with-rspack","last_synced_at":"2026-04-16T11:03:11.122Z","repository":{"id":300077444,"uuid":"1005114987","full_name":"Mirian97/microfronted-with-rspack","owner":"Mirian97","description":"🧩 Microfrontend project using Module Federation with Rspack, React, and TypeScript.  🧩 Home and About apps share components and styles dynamically at runtime.","archived":false,"fork":false,"pushed_at":"2025-06-19T20:41:16.000Z","size":268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-13T06:54:25.724Z","etag":null,"topics":["hot-module-replacement","module-federation","react","rspack","typescript","zephyr"],"latest_commit_sha":null,"homepage":"https://mirian97-265-about-microfronted-with-rspack-plugi-8b33c60a6-ze.zephyrcloud.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mirian97.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T17:35:10.000Z","updated_at":"2025-06-19T20:41:19.000Z","dependencies_parsed_at":"2025-06-19T21:30:43.778Z","dependency_job_id":null,"html_url":"https://github.com/Mirian97/microfronted-with-rspack","commit_stats":null,"previous_names":["mirian97/microfronted-with-rspack-plugin","mirian97/microfronted-with-rspack"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mirian97/microfronted-with-rspack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirian97%2Fmicrofronted-with-rspack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirian97%2Fmicrofronted-with-rspack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirian97%2Fmicrofronted-with-rspack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirian97%2Fmicrofronted-with-rspack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mirian97","download_url":"https://codeload.github.com/Mirian97/microfronted-with-rspack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mirian97%2Fmicrofronted-with-rspack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31882886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hot-module-replacement","module-federation","react","rspack","typescript","zephyr"],"created_at":"2025-09-13T06:52:10.177Z","updated_at":"2026-04-16T11:03:11.100Z","avatar_url":"https://github.com/Mirian97.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Microfrontend Project with Module Federation\n\nThis project demonstrates a **microfrontend architecture** using **Module Federation** with **Rspack**, **React**, and **TypeScript**. It consists of two applications: **Home** 🏠 and **About** 📄, which share components and styles dynamically at runtime.\n\n## Overview 📖\n\n- **Home App** (port `3000`): Exposes reusable `Header` and `Footer` components, along with global styles.\n- **About App** (port `3001`): Consumes `Header` and `Footer` from the Home app and integrates a `Profile` component.\n- Both apps leverage **Module Federation** to share `react` and `react-dom` dependencies, ensuring optimized bundle sizes.\n\n\u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"./assets/about.png\" alt=\"About App Preview\" width=\"400\" /\u003e\n   \u003cfigure\u003ePreview from About app\u003c/figure\u003e\n\u003c/div\u003e\n\n## Tech Stack 🛠️\n\n- **Rspack**: Next-gen bundler for fast builds ⚡\n- **React**: UI library for component-based architecture\n- **TypeScript**: Static typing for robust code\n- **Module Federation**: Dynamic module sharing between apps\n- **Zephyr Plugin**: Enhances Rspack configuration\n- **PostCSS**: CSS processing with Tailwind-compatible features\n- **SWC**: Super-fast JavaScript/TypeScript compiler\n\n## Features ✨\n\n- 📡 **Dynamic Component Sharing**: Home app exposes `Header` and `Footer`, consumed by About app.\n- 🎨 **Shared Styles**: Global CSS from Home app applied in About app.\n- ⚙️ **Hot Module Replacement**: Enabled in development with React Refresh.\n- 🌐 **CORS Support**: Configured for seamless cross-app communication.\n- 🔍 **Browser Compatibility**: Supports modern browsers (Chrome ≥ 87, Edge ≥ 88, Firefox ≥ 78, Safari ≥ 14).\n\n## Project Structure 🗂️\n\n```\n├── home/\n│   ├── src/\n│   │   ├── components/\n│   │   │   ├── header.tsx\n│   │   │   └── footer.tsx\n│   │   ├── index.css\n│   │   └── index.ts\n│   └── module-federation.config.js\n├── about/\n│   ├── src/\n│   │   ├── components/\n│   │   │   └── profile.tsx\n│   │   ├── index.css\n│   │   └── index.ts\n│   └── module-federation.config.js\n```\n\n## Getting Started 🏃‍♂️\n\n### Prerequisites\n\n- Node.js (v16 or higher)\n- npm or yarn\n\n### Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/Mirian97/microfronted-with-rspack.git\n   ```\n2. Navigate to each app folder (`home` and `about`) and install dependencies:\n   ```bash\n   cd home \u0026\u0026 npm install\n   cd ../about \u0026\u0026 npm install\n   ```\n\n### Running the Apps\n\n1. Start the **Home** app:\n   ```bash\n   cd home\n   npm start\n   ```\n   Access at `http://localhost:3000`\n2. Start the **About** app:\n   ```bash\n   cd about\n   npm start\n   ```\n   Access at `http://localhost:3001`\n\n### Development\n\n- Both apps run in development mode with hot reloading enabled 🔥.\n- Modify files in `src/` to see changes instantly.\n\n### Build\n\nTo create production builds:\n\n```bash\ncd home \u0026\u0026 npm run build\ncd ../about \u0026\u0026 npm run build\n```\n\n## Module Federation Config 🧩\n\n- **Home App**:\n  - Exposes: `Header`, `Footer`, and `styles`\n  - Unique name: `home`\n  - Public path: `http://localhost:3000/`\n- **About App**:\n  - Consumes: `home/Header`, `home/Footer`, `home/styles`\n  - Unique name: `about`\n  - Public path: `http://localhost:3001/`\n- Shared dependencies: `react`, `react-dom`\n\n## Contributing 🤝\n\n1. Fork the repository.\n2. Create a feature branch (`git checkout -b feature/new-feature`).\n3. Commit changes (`git commit -m 'Add new feature'`).\n4. Push to the branch (`git push origin feature/new-feature`).\n5. Open a Pull Request.\n\n## License 📜\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirian97%2Fmicrofronted-with-rspack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirian97%2Fmicrofronted-with-rspack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirian97%2Fmicrofronted-with-rspack/lists"}