Skip to content

Commit

Permalink
Upgrade documentation of use with create-react-app (ant-design#8085)
Browse files Browse the repository at this point in the history
  • Loading branch information
andriijas authored and afc163 committed Nov 1, 2017
1 parent bf82b4c commit a361060
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/react/use-with-create-react-app.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ $ yarn add react-app-rewire-less --dev
module.exports = function override(config, env) {
- config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css' }], config);
+ config = injectBabelPlugin(['import', { libraryName: 'antd', style: true }], config); // change importing css to less
+ config = rewireLess(config, env, {
+ config = rewireLess.withLoaderOptions({
+ modifyVars: { "@primary-color": "#1DA57A" },
+ });
+ })(config, env);
return config;
};
```
Expand Down
4 changes: 2 additions & 2 deletions docs/react/use-with-create-react-app.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ $ yarn add react-app-rewire-less --dev
module.exports = function override(config, env) {
- config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css' }], config);
+ config = injectBabelPlugin(['import', { libraryName: 'antd', style: true }], config);
+ config = rewireLess(config, env, {
+ config = rewireLess.withLoaderOptions({
+ modifyVars: { "@primary-color": "#1DA57A" },
+ });
+ })(config, env);
return config;
};
```
Expand Down

0 comments on commit a361060

Please sign in to comment.