mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +08:00
docs: add boilerplate samples
This commit is contained in:
parent
23415a062f
commit
f2f786d66d
@ -188,8 +188,12 @@ loaders: [
|
||||
|
||||
We use `modifyVars` option of [less-loader](https://github.com/webpack/less-loader#less-options) here, you can see a green button rendered on the page after reboot start server.
|
||||
|
||||
---
|
||||
## Source code and other boilerplates
|
||||
|
||||
Finally, we use antd with create-react-app successfully, you can learn these practice for your own webpack workflow too, and find more webpack config in the [atool-build](https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js). (For instance, add [moment noParse](https://github.com/ant-tool/atool-build/blob/e4bd2959689b6a95cb5c1c854a5db8c98676bdb3/src/getWebpackCommonConfig.js#L90) to avoid loading all language files)
|
||||
|
||||
Source code about this article:https://github.com/ant-design/create-react-app-antd
|
||||
There are a lot of great boilerplates in React community. You may encounter some problems when import antd in them, there are some source code samples including create-react-app in this article.
|
||||
|
||||
- [create-react-app-antd](https://github.com/ant-design/create-react-app-antd)
|
||||
- [react-boilerplate/react-boilerplate](https://github.com/ant-design/react-boilerplate)
|
||||
- [kriasoft/react-starter-kit](https://github.com/ant-design/react-starter-kit)
|
||||
|
@ -188,8 +188,12 @@ loaders: [
|
||||
|
||||
修改后重启 `yarn start`,如果看到一个绿色的按钮就说明配置成功了。
|
||||
|
||||
---
|
||||
## 源码和其他脚手架
|
||||
|
||||
以上是在 create-react-app 中使用 antd 的相关实践,你也可以借鉴此文的做法在自己的 webpack 工作流中使用 antd,更多 webpack 配置可参考 [atool-build](https://github.com/ant-tool/atool-build/blob/master/src/getWebpackCommonConfig.js)。(例如加入 [moment noParse](https://github.com/ant-tool/atool-build/blob/e4bd2959689b6a95cb5c1c854a5db8c98676bdb3/src/getWebpackCommonConfig.js#L90) 避免加载所有语言文件)
|
||||
|
||||
本例所有源码可见:https://github.com/ant-design/create-react-app-antd
|
||||
React 生态圈中还有很多优秀的脚手架,使用它们并引入 antd 时,你可能会遇到一些问题,下面是一些著名脚手架使用 antd 的范例,包括本文中的 create-react-app 示例源码。
|
||||
|
||||
- [react-boilerplate/react-boilerplate](https://github.com/ant-design/react-boilerplate)
|
||||
- [kriasoft/react-starter-kit](https://github.com/ant-design/react-starter-kit)
|
||||
- [create-react-app-antd](https://github.com/ant-design/create-react-app-antd)
|
||||
|
Loading…
Reference in New Issue
Block a user