-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig-overrides.js
More file actions
27 lines (24 loc) · 848 Bytes
/
Copy pathconfig-overrides.js
File metadata and controls
27 lines (24 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// https://github.com/timarney/react-app-rewired/issues/348#issuecomment-452199363
const { override, fixBabelImports, addLessLoader } = require("customize-cra");
module.exports = override(
fixBabelImports("import", {
libraryName: "antd",
libraryDirectory: "es",
style: true // change importing css to less
}),
addLessLoader({
javascriptEnabled: true,
modifyVars: { "@primary-color": "#1DA57A" }
})
);
// const { injectBabelPlugin } = require("react-app-rewired");
// /**
// * {@link https://ant.design/docs/react/use-with-create-react-app#Use-babel-plugin-import|AntD-Use babel-plugin-import}
// */
// module.exports = function override(config, env) {
// config = injectBabelPlugin(
// ["import", { libraryName: "antd", libraryDirectory: "es", style: "css" }],
// config
// );
// return config;
// };