Created
April 23, 2020 01:13
-
-
Save ustropo/c6f4f71e31c74d2fb9c93d60dca9850c to your computer and use it in GitHub Desktop.
configuração padrão para tema escuro no Antd - válido para a versão 4.1.4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { override, fixBabelImports, addLessLoader, addWebpackPlugin } = require('customize-cra'); | |
const { getThemeVariables } = require('antd/dist/theme'); | |
const AntdDayjsWebpackPlugin = require('antd-dayjs-webpack-plugin'); | |
module.exports = override( | |
fixBabelImports('import', { | |
libraryName: 'antd', | |
libraryDirectory: 'es', | |
style: true, | |
}), | |
addLessLoader({ | |
javascriptEnabled: true, | |
modifyVars: { | |
...getThemeVariables({dark: true}), | |
'@primary-color': '#1DA57A', | |
}, | |
}), | |
addWebpackPlugin(new AntdDayjsWebpackPlugin()) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment