pioner-ant-json-config
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "pioner-ant-json-config", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "JSON configuration for Ant design framework providing customized styling for components ", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -30,2 +30,3 @@ ## Install | ||
### with react-app-rewire | ||
https://github.com/timarney/react-app-rewired | ||
@@ -72,6 +73,26 @@ In config-overrides.js: | ||
Basically follow this: https://medium.com/@GeoffMiller/how-to-customize-ant-design-with-react-webpack-the-missing-guide-c6430f2db10f, | ||
just switch themeVariables to correct source, also set "javascriptEnabled: true " as shown below: | ||
just switch themeVariables to correct source in webpack config. Also set "javascriptEnabled: true " in less-loader. | ||
Step 4: | ||
**webpack config:** | ||
```bash | ||
const themeVariables = require('pioner-ant-json-config'); | ||
``` | ||
```bash | ||
plugins: [ | ||
[ | ||
require.resolve('babel-plugin-named-asset-import'), | ||
{ | ||
loaderMap: { | ||
svg: { | ||
ReactComponent: '@svgr/webpack?-prettier,-svgo![path]', | ||
}, | ||
}, | ||
}, | ||
], | ||
['import', { libraryName: "antd", style: true }] // add this | ||
], | ||
``` | ||
```bash | ||
{ | ||
@@ -84,3 +105,3 @@ test: /\.less$/, | ||
options: { | ||
**javascriptEnabled: true,** | ||
javascriptEnabled: true, | ||
modifyVars: themeVariables | ||
@@ -90,3 +111,3 @@ } | ||
] | ||
} | ||
} | ||
``` | ||
@@ -93,0 +114,0 @@ |
2923
113