doc: update practical-project

This commit is contained in:
afc163 2018-03-17 18:07:33 +08:00
parent 50aae9408e
commit 411181e6ec
2 changed files with 6 additions and 6 deletions

View File

@ -64,9 +64,11 @@ $ npm install antd babel-plugin-import --save
Edit `.webpackrc` to integrate `babel-plugin-import`.
```diff
{
+ "extraBabelPlugins": [
+ ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
+ ],
+ ]
}
```
> Notice: dva-cli's build and dev is based on roadhog, view [roadhog#Configuration](https://github.com/sorrycc/roadhog/blob/master/README_en-us.md#configuration) for more `.webpackrc` Configuration.
@ -149,8 +151,6 @@ dva manages the domain model with `model`, with reducers for synchronous state u
Let's create a model `models/products.js` by typing:
```javascript
import dva from 'dva';
export default {
namespace: 'products',
state: [],

View File

@ -66,9 +66,11 @@ $ npm install antd babel-plugin-import --save
编辑 `.webpackrc`,使 `babel-plugin-import` 插件生效。
```diff
{
+ "extraBabelPlugins": [
+ ["import", { "libraryName": "antd", "libraryDirectory": "es", "style": "css" }]
+ ],
+ ]
}
```
> 注dva-cli 基于 roadhog 实现 build 和 dev更多 `.webpackrc` 的配置详见 [roadhog#配置](https://github.com/sorrycc/roadhog#配置)
@ -151,8 +153,6 @@ dva 通过 model 的概念把一个领域的模型管理起来,包含同步更
新建 model `models/products.js`
```javascript
import dva from 'dva';
export default {
namespace: 'products',
state: [],