Commit 77357aee authored by 陈帅's avatar 陈帅

fix #2791, product environment removal plugin

parent 802930e7
...@@ -5,6 +5,8 @@ import AntDesignThemePlugin from 'antd-theme-webpack-plugin'; ...@@ -5,6 +5,8 @@ import AntDesignThemePlugin from 'antd-theme-webpack-plugin';
import path from 'path'; import path from 'path';
export default config => { export default config => {
// pro 和 开发环境再添加这个插件
if (process.env.APP_TYPE === 'site' || 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/');
...@@ -27,4 +29,5 @@ export default config => { ...@@ -27,4 +29,5 @@ export default config => {
lessUrl: 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js', lessUrl: 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js',
}, },
]); ]);
}
}; };
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