通用评论

config-overrides.js 509B

12345678910111213141516171819
  1. const { injectBabelPlugin, compose } = require('react-app-rewired');
  2. const rewireCssModules = require('react-app-rewire-css-modules');
  3. const rewireLess = require('react-app-rewire-less');
  4. module.exports = compose(
  5. rewireCssModules,
  6. )
  7. module.exports = function override(config, env) {
  8. const rewires = compose(
  9. // rewireCssModules,
  10. rewireLess
  11. );
  12. config = injectBabelPlugin(['import', { libraryName: 'antd', libraryDirectory: 'es', style: 'css' }], config);
  13. return rewires(config, env);
  14. };