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': '#1890FF', //主题色
							'@breadcrumb-last-item-color': '#1890FF', //面包屑最后一个字体颜色
							'@footer-bar-color': '#CFE8FF', //表单页底部提交栏
							'@tr-event-color': '#E7F4FF', //表格偶数行颜色
							'@table-header-bg': '#CBE5FE',
							'@table-header-color': '#333',
							'@table-row-hover-bg': 'none',
						},
					},
				},
			},
		},
	]
};