mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
feat(docs): add a new antd boilerplate. (#9225)
This commit is contained in:
parent
0c69d721de
commit
26b58a9808
@ -213,6 +213,11 @@ We use `modifyVars` option of [less-loader](https://github.com/webpack/less-load
|
||||
|
||||
You can also follow instructions in [Use in create-react-app](/docs/react/use-with-create-react-app.en-US.md), then use [react-app-rewire-typescript][https://github.com/lwd-technology/react-app-rewire-typescript] to setup the TypeScript development environment by yourself.
|
||||
|
||||
And you can use [react-scripts-ts-antd](https://www.npmjs.com/package/react-scripts-ts-antd) which includes ts-import-plugin, react-app-rewired, scss, less and etc.You can create a new project that without any configurations by running just one command.
|
||||
```bash
|
||||
$ create-react-app my-project --scripts-version=react-scripts-ts-antd
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### error TS2605: JSX element type Xxx is not a constructor function for JSX elements.
|
||||
|
@ -215,6 +215,11 @@ $ yarn add react-app-rewire-less --dev
|
||||
|
||||
你也可以根据 [在 create-react-app 中使用](/docs/react/use-with-create-react-app.zh-CN.md) 的介绍使用 [react-app-rewire-typescript][https://github.com/lwd-technology/react-app-rewire-typescript] 自己来配置 TypeScript 的开发环境。
|
||||
|
||||
此外,还可以选择 [react-scripts-ts-antd](https://www.npmjs.com/package/react-scripts-ts-antd),其中已经配置好了 ts-import-plugin、react-app-rewired、scss、less 等常用功能。只需一条命令即可生成一个免配置的 TypeScript 项目.
|
||||
```bash
|
||||
$ create-react-app my-project --scripts-version=react-scripts-ts-antd
|
||||
```
|
||||
|
||||
## 常见问题
|
||||
|
||||
### error TS2605: JSX element type Xxx is not a constructor function for JSX elements.
|
||||
|
Loading…
Reference in New Issue
Block a user