Closed sorrycc closed 4 years ago
关注
umi component 的一个目的是支持 monorepo 开发吗?
.
├── README.md
├── lerna.json
├── package.json
├── packages
│ └── @myscope
│ ├── my-app-components # 使用 umi component 编译
│ ├── other-libs # 自己配置 rollup 编译
│ └── my-app # 使用 umi 编译,业务强耦合的代码
└── yarn.lock
其中业务强耦合的代码放在 my-app-component ,使用 umi component
编译。
与业务脱耦合的可复用的组件/代码等,放在 my-app-components 和 other-libs ,甚至可以单独发布。
也可以引入一些物料市场内的库,直接放在 @myscope
目录下,稍作修改被其余库引入。
顺便提一下,umi component 是不是可以改成 umi library 啊,因为非组件的库,比如 hooks 之类的,还有其余的一些很纯粹的工具函数库,也可以用它打包。
我们目前可以考虑使用 https://github.com/developit/microbundle
希望能增加是否使用内置antd的选项,有的项目是用的antd2.x。
另外感觉即使开启了modules: false , antd的tree-shaking还是没生效
sorrycc/todos#238 这个链接 404 了
关注
1.既然umi是内置dva的 那么dva原生的方法 是否应该暴露出来 (包括dva生命周期是否可以覆盖) 2.目前umi 的 2.2版本 在路由和layout上感觉还是有些单一( 比如不支持动态插入路由 还有默认的路由约定感觉很鸡肋 因为没有和layout关联起来) 不过在总体思路和编辑速度上比pro1.x 的roadhog那版强太多了 期待 @sorrycc 继续发力
目前UMI的目录是约束的,不适合monorepo开发,例如yarn的workspace,或者官方能提供示例
请问,以后版本中考虑支持小程序(微信/支付宝/百度)么?
SSR急需,希望可以支持
SSR +1
Tree shaking +1
期待useEverything
SSR+1
SSR+1
SSR+1
什么时候能把那些旧的不维护的依赖包升级上一部分,现在看着都不敢用猛用啊,怕冲突
@liresky 那些包?
物料和组件的概念是如何定义的?他们的粒度和关系是如何的?
这里提到的物料就是 umi block 吧, 简单的理解它就是可复用的代码块吧? 组件是否就是构成 block 的元素?它和 umi 可以没有关系吧。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
2.x
Big Features
vue ui
和angular console
,业界方案已经比较成熟,很多可以拿来用,我们可以做得不一样的是可以结合路由和数据流来做,支持插件扩展,umijs/umi#272,umijs/umi#1415umi library
露出,提供 dev, build, publish 等命令,基于 rollup,storyboook、docz 等,更多详见 umijs/umi#628,umijs/umi#1550dev/build 提速
部署和使用场景
路由
性能
dva
option.disableModelDynamicImport
,允许开了 dynamicImport 时也全量加载 model,避免 dev 和 prod model 加载不一致的问题Misc
umi storybook
启动umi generate
,目前只有umi g page
[ ] 默认内置埋点,捕获使用率、命令行出错、umi dev 出错等,分级,比如 log 和 error,允许关闭,区分是否阿里内部用户src/pages/**/__mock__/*.js
--pnp
支持umi serve
,servedist/
下的静态文件,但包含 mock 功能import './a.css'
不走 css modules,import styles from './a.css'
走 css modules,#14173.x
有 break-change 的改动放这里,无实际开发计划。
持续做
参考