Tencent / hel

A module federation SDK which is unrelated to tool chain for module consumer. 工具链无关的运行时模块联邦sdk.
https://tencent.github.io/hel/
Other
933 stars 79 forks source link

enable workspace #17

Closed OxPatient closed 1 year ago

OxPatient commented 1 year ago

增加monorep支持 pnpm worksapce + turbo

OxPatient commented 1 year ago

增加了pretiier格式化规范,并执行代码格式化

fantasticsoul commented 1 year ago

太棒了,感谢你的支持

fantasticsoul commented 1 year ago

我拉了代码,把原来的node_modules 删除了,在根目录执行 pnpm i,在 packages/hel-micro-react执行 pnpm i,然后执行 npm run build 想尝试构建一下hel-micro-react包体,报错如下:

image

你遇到这个问题了么,该如何解决呢

fantasticsoul commented 1 year ago

目前我暂时是在 packages/hel-micro-react目录下执行了以下命令才解决的

pnpm i hel-micro hel-micro-core hel-types react react-dom

一个全新的项目检出后正确的执行步骤是什么呢

fantasticsoul commented 1 year ago

我调整了下声明 https://github.com/tnfe/hel/commit/088cf2ca05bc0bb39b9ebadd533455caa2d142fc

现在执行以下步骤,能够跑通了

git clone https://github.com/tnfe/hel.git
cd hel
pnpm i
cd packages/hel-micro-react
pnpm i
npm run build

但还是出现一个问题,react没有类型提示了例如 https://github.com/tnfe/hel/blob/main/packages/hel-micro-react/src/components/ShadowBody.tsx

红箭头处是any,鼠标不能点击看到类型声明了

image
fantasticsoul commented 1 year ago

添加好声明已解决: https://github.com/tnfe/hel/commit/da19ce545bfb6cc919c7edcf67b9d4def21ccf2d