Commit a1fba362 authored by huangzheng's avatar huangzheng

remove MergeLessPlugin

parent 600332e6
// Change theme plugin // Change theme plugin
import MergeLessPlugin from 'antd-pro-merge-less'; // import MergeLessPlugin from 'antd-pro-merge-less';
// import AntDesignThemePlugin from 'antd-theme-webpack-plugin'; // import AntDesignThemePlugin from 'antd-theme-webpack-plugin';
import ThemeColorReplacer from 'webpack-theme-color-replacer'; import ThemeColorReplacer from 'webpack-theme-color-replacer';
import path from 'path'; import path from 'path';
...@@ -32,15 +32,15 @@ export default (config: any) => { ...@@ -32,15 +32,15 @@ export default (config: any) => {
process.env.NODE_ENV !== 'production' process.env.NODE_ENV !== 'production'
) { ) {
// 将所有 less 合并为一个供 themePlugin使用 // 将所有 less 合并为一个供 themePlugin使用
const outFile = path.join(__dirname, '../.temp/ant-design-pro.less'); // const outFile = path.join(__dirname, '../.temp/ant-design-pro.less');
const stylesDir = path.join(__dirname, '../src/'); // const stylesDir = path.join(__dirname, '../src/');
config.plugin('merge-less').use(MergeLessPlugin, [ // config.plugin('merge-less').use(MergeLessPlugin, [
{ // {
stylesDir, // stylesDir,
outFile, // outFile,
}, // },
]); // ]);
config.plugin('webpack-theme-color-replacer').use(ThemeColorReplacer, [ config.plugin('webpack-theme-color-replacer').use(ThemeColorReplacer, [
{ {
fileName: 'css/theme-colors.css', fileName: 'css/theme-colors.css',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment