fix(ui): 🐛 postcss / customize-cra compatibility

ref https://github.com/arackaf/customize-cra/issues/315\#issuecomment-1017081592
This commit is contained in:
Collin M. Barrett 2022-01-22 11:09:59 -06:00
parent 05e094edd7
commit 4a2a4272ba

View file

@ -1,5 +1,10 @@
const { getThemeVariables } = require("antd/dist/theme");
const { override, fixBabelImports, addLessLoader } = require("customize-cra");
const {
override,
fixBabelImports,
addLessLoader,
adjustStyleLoaders,
} = require("customize-cra");
module.exports = override(
fixBabelImports("import", {
@ -17,5 +22,9 @@ module.exports = override(
}),
},
},
}),
adjustStyleLoaders(({ use: [, , postcss] }) => {
const postcssOptions = postcss.options;
postcss.options = { postcssOptions };
})
);