You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
627 B
19 lines
627 B
import AntDesignThemePlugin from 'antd-theme-webpack-plugin';
|
|
|
|
const path = require('path');
|
|
|
|
export default webpackConfig => {
|
|
const options = {
|
|
antDir: path.join(__dirname, './node_modules/antd'),
|
|
stylesDir: path.join(__dirname, './src'),
|
|
varFile: path.join(__dirname, './node_modules/antd/lib/style/themes/default.less'),
|
|
mainLessFile: path.join(__dirname, './src/index.less'),
|
|
themeVariables: ['@primary-color'],
|
|
indexFileName: 'index.html',
|
|
};
|
|
|
|
const themePlugin = new AntDesignThemePlugin(options);
|
|
// in config object
|
|
webpackConfig.plugins.push(themePlugin);
|
|
return webpackConfig;
|
|
};
|
|
|