From 4647d46c22dcaba7242253a5977b807c68508e75 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 10 Nov 2018 12:42:11 +0800 Subject: [PATCH] :wrench: Use webpackbar in antd-tools and bisheng --- package.json | 1 - site/bisheng.config.js | 20 -------------------- webpack.config.js | 19 ------------------- 3 files changed, 40 deletions(-) diff --git a/package.json b/package.json index 02731acb58..7aee1ca557 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,6 @@ "typescript": "~3.1.1", "unified": "^7.0.0", "values.js": "^1.0.3", - "webpackbar": "^3.1.2", "xhr-mock": "^2.4.1", "xhr2": "^0.1.4" }, diff --git a/site/bisheng.config.js b/site/bisheng.config.js index 24e7ad015d..0df0b89cc5 100644 --- a/site/bisheng.config.js +++ b/site/bisheng.config.js @@ -1,8 +1,6 @@ const path = require('path'); const CSSSplitWebpackPlugin = require('css-split-webpack-plugin').default; const replaceLib = require('antd-tools/lib/replaceLib'); -const webpack = require('webpack'); -const WebpackBar = require('webpackbar'); const isDev = process.env.NODE_ENV === 'development'; const usePreact = process.env.REACT_ENV === 'preact'; @@ -22,23 +20,6 @@ function alertBabelConfig(rules) { }); } -function usePrettyWebpackBar(config) { - // remove old progress plugin. - config.plugins = config.plugins - .filter((plugin) => { - return !(plugin instanceof webpack.ProgressPlugin) - && !(plugin instanceof WebpackBar); - }); - - // use brand new progress bar. - config.plugins.push( - new WebpackBar({ - name: '📦 Ant Design Site', - minimal: false, - }) - ); -} - module.exports = { port: 8001, source: { @@ -131,7 +112,6 @@ module.exports = { } alertBabelConfig(config.module.rules); - usePrettyWebpackBar(config); config.plugins.push( new CSSSplitWebpackPlugin({ size: 4000 }), diff --git a/webpack.config.js b/webpack.config.js index 2674478c0b..8cc18a502d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,7 +1,6 @@ // This config is for building dist files const webpack = require('webpack'); const getWebpackConfig = require('antd-tools/lib/getWebpackConfig'); -const WebpackBar = require('webpackbar'); // noParse still leave `require('./locale' + name)` in dist files // ignore is better @@ -29,30 +28,12 @@ function externalMoment(config) { }; } -function usePrettyWebpackBar(config) { - // remove old progress plugin. - config.plugins = config.plugins - .filter((plugin) => { - return !(plugin instanceof webpack.ProgressPlugin) - && !(plugin instanceof WebpackBar); - }); - - // use brand new progress bar. - config.plugins.push( - new WebpackBar({ - name: '📦 Webpack', - minimal: false, - }) - ); -} - const webpackConfig = getWebpackConfig(false); if (process.env.RUN_ENV === 'PRODUCTION') { webpackConfig.forEach((config) => { ignoreMomentLocale(config); externalMoment(config); addLocales(config); - usePrettyWebpackBar(config); }); }