craco.config.js 581 B

12345678910111213141516171819202122
  1. const CracoLessPlugin = require('craco-less');
  2. const createThemeColorReplacerPlugin = require("./src/utils/plugin.config");
  3. module.exports = {
  4. plugins: [
  5. {
  6. plugin: CracoLessPlugin,
  7. options: {
  8. lessLoaderOptions: {
  9. lessOptions: {
  10. modifyVars: {},
  11. javascriptEnabled: true,
  12. },
  13. },
  14. },
  15. },
  16. ],
  17. webpack: {
  18. // 这里面是webpack的配置
  19. plugins: [createThemeColorReplacerPlugin()],
  20. }
  21. };