const { whenProd } = require('@craco/craco'); const CracoLessPlugin = require('craco-less'); module.exports = { babel: { plugins: [ ...whenProd( () => [['transform-remove-console', { exclude: ['error'] }]], [], ), ], }, plugins: [ { plugin: CracoLessPlugin, options: { lessLoaderOptions: { lessOptions: { javascriptEnabled: true, modifyVars: { '@primary-color': '#0067d3', //主题色 '@breadcrumb-last-item-color': '#0067d3', //面包屑最后一个字体颜色 '@footer-bar-color': '#d3e8fe', //表单页底部提交栏 '@tr-event-color': '#f6faff', //表格偶数行颜色 '@table-header-bg': '#d6eaff', '@table-header-color': '#333', '@table-row-hover-bg': 'none', }, }, }, }, }, ] };