3.0 之后定制主题的写法
feige-2011 opened this issue · 2 comments
feige-2011 commented
"@ant-design/react-native": "^3.1.5"
"react-native": "0.58.4",
ios
哪位老师帮忙写一下 3.0 之后定制主题的写法,谢谢啦!
3.0 之前我没用过,现在需要做夜间模式,文档中没有写主题怎么定制
yaogengzhu commented
同问
yaogengzhu commented
const path = require("path");
const { fixBabelImports, addLessLoader } = require("customize-cra");
const theme = require('./package.json').theme
module.exports = function override(config, env) {
config = fixBabelImports('import', {
libraryName: 'antd-mobile',
style: true
})(config)
addLessLoader({
modifyVars: theme
})(config, env)
return config;
};
这样配置后可以正常使用