mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 10:49:00 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			563 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| require('dotenv').config();
 | |
| const CracoAntDesignPlugin = require('craco-antd');
 | |
| 
 | |
| const themeConfig = require(`./src/conf/theme/${process.env.REACT_APP_THEME_CONFIG}`);
 | |
| 
 | |
| function addLessPrefixToKeys(styles) {
 | |
|     const output = {};
 | |
|     Object.keys(styles).forEach((key) => {
 | |
|         output[`@${key}`] = styles[key];
 | |
|     });
 | |
|     return output;
 | |
| }
 | |
| 
 | |
| module.exports = {
 | |
|     plugins: [
 | |
|         {
 | |
|             plugin: CracoAntDesignPlugin,
 | |
|             options: {
 | |
|                 customizeTheme: addLessPrefixToKeys(themeConfig.styles),
 | |
|             },
 | |
|         },
 | |
|     ],
 | |
| };
 | 
