Skip to content

Commit cc019da

Browse files
committed
update customize-antd-themevia dora
1 parent 7df77fe commit cc019da

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

examples/customize-antd-theme/a.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3+
import 'antd/style/index.less'; // import less for modifyVars
34
import { Form, Select, InputNumber, Datepicker, Switch, Slider, Button, message, Row, Col } from 'antd';
4-
import 'antd/style/index.less'; // after import antd
55
const FormItem = Form.Item;
66
const Option = Select.Option;
77

examples/customize-antd-theme/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@
55
]
66
},
77
"dependencies": {
8-
"antd": "~0.10.4",
8+
"antd": "0.10.x",
99
"react": "~0.14.3",
1010
"react-dom": "~0.14.3"
1111
},
1212
"devDependencies": {
13-
"antd-bin": "~0.10.2"
13+
"atool-build": "0.1.x",
14+
"babel-plugin-antd": "^0.1.2",
15+
"dora": "0.1.0-beta5",
16+
"dora-plugin-atool-build": "^0.1.1",
17+
"dora-plugin-proxy": "^0.2.0"
1418
},
1519
"theme": {
1620
"primary-color": "#1DA57A"
1721
},
1822
"scripts": {
19-
"build": "antd build",
20-
"start": "antd server"
23+
"start": "dora -p 8001 --plugins atool-build,proxy"
2124
}
2225
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = function(webpackConfig) {
2+
webpackConfig.module.loaders.forEach(function(loader) {
3+
if (loader.loader === 'babel') {
4+
// https://github.com/ant-design/babel-plugin-antd
5+
loader.query.plugins.push('antd');
6+
}
7+
return loader;
8+
});
9+
10+
return webpackConfig;
11+
};

0 commit comments

Comments
 (0)