{"action":"created","issue":{"url":"https://api.github.com/repos/umijs/umi/issues/1365","repository_url":"https://api.github.com/repos/umijs/umi","labels_url":"https://api.github.com/repos/umijs/umi/issues/1365/labels{/name}","comments_url":"https://api.github.com/repos/umijs/umi/issues/1365/comments","events_url":"https://api.github.com/repos/umijs/umi/issues/1365/events","html_url":"https://github.com/umijs/umi/issues/1365","id":375409957,"node_id":"MDU6SXNzdWUzNzU0MDk5NTc=","number":1365,"title":"Roadmap for 2.x","user":{"login":"sorrycc","id":35128,"node_id":"MDQ6VXNlcjM1MTI4","avatar_url":"https://avatars1.githubusercontent.com/u/35128?v=4","gravatar_id":"","url":"https://api.github.com/users/sorrycc","html_url":"https://github.com/sorrycc","followers_url":"https://api.github.com/users/sorrycc/followers","following_url":"https://api.github.com/users/sorrycc/following{/other_user}","gists_url":"https://api.github.com/users/sorrycc/gists{/gist_id}","starred_url":"https://api.github.com/users/sorrycc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorrycc/subscriptions","organizations_url":"https://api.github.com/users/sorrycc/orgs","repos_url":"https://api.github.com/users/sorrycc/repos","events_url":"https://api.github.com/users/sorrycc/events{/privacy}","received_events_url":"https://api.github.com/users/sorrycc/received_events","type":"User","site_admin":false},"labels":[{"id":823267932,"node_id":"MDU6TGFiZWw4MjMyNjc5MzI=","url":"https://api.github.com/repos/umijs/umi/labels/Discussion","name":"Discussion","color":"cf4ff2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-10-30T10:09:54Z","updated_at":"2018-12-18T05:09:48Z","closed_at":null,"author_association":"MEMBER","body":"## 2.x\r\n\r\n### Big Features\r\n\r\n* [ ] **物料市场**，分工具和市场两部分，umijs/umi#1350\r\n* [ ] **umi ui**，类似 `vue ui` 和 `angular console`，业界方案已经比较成熟，很多可以拿来用，我们可以做得不一样的是可以结合路由和数据流来做，支持插件扩展，umijs/umi#272，umijs/umi#1415\r\n* [ ] 支持**组件开发**，通过 `umi library` 露出，提供 dev, build, publish 等命令，基于 rollup，storyboook、docz 等，更多详见 umijs/umi#628，umijs/umi#1550\r\n* [ ] **SSR**，优先级较低，内部需求少，但对外是一个大 feature，保持关注和调研，umijs/umi#1330\r\n\r\n### dev/build 提速\r\n\r\n* [ ] 提供 **umi-plugin-externals**，除了配置 webpack 的 externals\r\n* [ ] 考虑 **noParse** 和 **uglifyjs 的 exclude** 等，使 umi 的 build/dev 速度上一个台阶\r\n* [ ] 把 1.x 的**按需编译**加回来，对于一些极庞大业务会有用，比如语雀和云凤蝶\r\n* [ ] 支持 tree-shaking，一直以为是支持的。。umijs/umi#1364\r\n\r\n### 部署和使用场景\r\n\r\n* [ ] 支持**运行时扩展路由**，包含组件、model（如果开启了 dva）等，需提供一个例子，扩展的文件打包成 umd 格式，比如 umijs/umi#427\r\n* [ ] 提供 **umi-plugin-egg**，更方便地接入 [eggjs](https://eggjs.org/)\r\n\r\n### 路由\r\n\r\n* [x] 支持**路由解耦**，即 html 文件不依赖 url，随便放哪都能访问，简单实现是用 [MemoryRouter](https://reacttraining.com/react-router/web/api/MemoryRouter)，复杂实现需要移除 react-router 和 react-router-dom, umijs/umi#1383\r\n* [ ] 支持**多 layout**，比如 umijs/umi#832\r\n* [ ] 路由识别可以更智能一些，自动识别 pages 下的文件是否为 react component，不是的话直接排除掉，比如 dva 的 model、service、utils 等，无需额外配置\r\n\r\n### 性能\r\n\r\n* [ ] 支持 **Prefetch**\r\n\r\n### dva\r\n\r\n* [ ] 支持配置 `option.disableModelDynamicImport`，允许开了 dynamicImport 时也全量加载 model，避免 dev 和 prod model 加载不一致的问题\r\n* [ ] 改造 model 加载方式，dva 的 model 等处理成 route 上的配置，便于运行时扩展\r\n\r\n### Misc\r\n\r\n* [x] 支持 **config.cssPublicPath** 配置，对应 [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) 的 publicPath 配置，解决比如 umijs/umi#1357 的问题，#1409\r\n* [ ] 通过 **umi-plugin-storybook** 整合 [storybook](https://github.com/storybooks/storybook)，通过 `umi storybook` 启动\r\n* [ ] 完善 **`umi generate`**，目前只有 `umi g page`\r\n* [ ] 默认**内置埋点**，捕获使用率、命令行出错、umi dev 出错等，分级，比如 log 和 error，允许关闭，区分是否阿里内部用户\r\n* [ ] 提供 **umi-plugin-eslint**，把 1.x 的 eslint 校验加回来，https://github.com/umijs/umi/issues/1371#issuecomment-434586670\r\n* [ ] 支持**在 page 下写 mock**，这样 mock、model、route 就可以自成一体，比如 mock 解析时包含所有 `src/pages/**/__mock__/*.js`\r\n* [ ] 进一步**完善 pnp**支持，比如 dll 支持 pnp，让 ant-design-pro 可以用 pnp 跑，create-umi 通过 `--pnp` 支持\r\n* [ ] node_modules 考虑走 babel transform，然后 @babel/preset-env 的 polyfill 用 usage，可进一步减少尺寸，同时完美地解决 node_modules es6 代码的 uglifyjs 问题\r\n* [ ] 和 react hooks 的结合，比如 useRouter\r\n* [ ] `umi serve`，serve `dist/` 下的静态文件，但包含 mock 功能\r\n* [ ] 锁定全部三方依赖版本，定期升级\r\n* [ ] umi-plugin-nprogress\r\n* [ ] 针对 ant-design-pro 的场景，试验全量打包和秒开提速。群里有讨论如何为打包提速，webpack 作为通用方案能提的其实已经有限，由于 babel 和 uglifyjs 的存在，不太可能有质变。但针对一些垂直场景还是可以探索一下的，比如 antd-pro、h5 等。比如 antd-pro，可以考虑全量打包依赖，然后用 systemjs 处理项目文件，小程序那边已实现，可以结合考虑一下，最佳情况可以实现秒开，但限制也比较明显。\r\n* [ ] create-umi 支持 typescript\r\n* [ ] 更智能的 css modules 支持方式，`import './a.css'` 不走 css modules，`import styles from './a.css'` 走 css modules，#1417\r\n* [ ] 升级 uglifyjs-webpack-plugin 到 2\r\n\r\n## 3.x\r\n\r\n有 break-change 的改动放这里，无实际开发计划。\r\n\r\n* 配置文件 (.umirc.js, config/config.js) 里寻找路径有点混乱，比如 route component 是从 page 开始找的，又比如 theme 字符串是从根目录开始找的\r\n\r\n## 持续做\r\n\r\n* 文档完善\r\n* 完成视频教程\r\n* 用例补充\r\n\r\n## 参考\r\n\r\n* umijs/umi#628\r\n* https://github.com/sorrycc/todos/issues/238#issuecomment-419618621\r\n* https://github.com/sorrycc/todos/issues/196\r\n"},"comment":{"url":"https://api.github.com/repos/umijs/umi/issues/comments/448098352","html_url":"https://github.com/umijs/umi/issues/1365#issuecomment-448098352","issue_url":"https://api.github.com/repos/umijs/umi/issues/1365","id":448098352,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODA5ODM1Mg==","user":{"login":"anshengme","id":16428340,"node_id":"MDQ6VXNlcjE2NDI4MzQw","avatar_url":"https://avatars2.githubusercontent.com/u/16428340?v=4","gravatar_id":"","url":"https://api.github.com/users/anshengme","html_url":"https://github.com/anshengme","followers_url":"https://api.github.com/users/anshengme/followers","following_url":"https://api.github.com/users/anshengme/following{/other_user}","gists_url":"https://api.github.com/users/anshengme/gists{/gist_id}","starred_url":"https://api.github.com/users/anshengme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anshengme/subscriptions","organizations_url":"https://api.github.com/users/anshengme/orgs","repos_url":"https://api.github.com/users/anshengme/repos","events_url":"https://api.github.com/users/anshengme/events{/privacy}","received_events_url":"https://api.github.com/users/anshengme/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T05:09:48Z","updated_at":"2018-12-18T05:09:48Z","author_association":"NONE","body":"SSR急需，希望可以支持"}}
{"actor":{"display_login":"anshengme"}}