Git Product home page Git Product logo

comadaihiep92 / module-federation-example-react-typescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from postor/module-federation-example-react-typescript

0.0 0.0 0.0 452 KB

带类型的微前端架构 | module federation example of react and typescript

Home Page: https://postor.medium.com/how-to-keep-types-while-using-module-federation-3486b5cd2d73

HTML 5.38% TypeScript 51.77% CSS 7.95% JavaScript 34.90%

module-federation-example-react-typescript's Introduction

带类型的微前端架构 | module federation example of react and typescript

此项目尝试解决以下问题 | this project is to solve:

  • 微前端架构,各子项目独立编译 | separate building and work together
  • 保持类型检查,和代码提示 | keep typing
  • 子项目可以独立工作,不依赖线上服务 | sub project can work on their own, no need other's online service

项目简述 | projects

  • lib-app 纯底层库 | pure vendor libs (react,react-dom)
  • component-app 自定义组件库 | customized components (buttons, tips)
  • main-app 主项目,使用底层库和组件库 | main app that uses libs and components

代码基于 | codes based on complete-react-case

修改后增加了类型和子项目独立工作的能力 | added typing and ability for sub projects to work on their own

使用 | try on your own

cd lib-app
npm i 
npm run build

cd ../component-app
npm i 
npm run build

cd ../main-app
npm i 
npm run dev

module-federation-example-react-typescript's People

Contributors

postor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.