提交 7a2c088b 编写于 作者: B break60 提交者: qiaozhanwei

add progress-bar-webpack-plugin (#1215)

* Modify webpack configuration

* Change all Chinese names to English

* add progress-bar-webpack-plugin
上级 01c2b12d
......@@ -18,6 +18,7 @@ const webpack = require('webpack')
const merge = require('webpack-merge')
const { assetsDir, baseConfig } = require('./config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ProgressPlugin = require('progress-bar-webpack-plugin')
const getEnv = require('env-parse').getEnv
const config = merge.smart(baseConfig, {
......@@ -113,6 +114,7 @@ const config = merge.smart(baseConfig, {
clientLogLevel: 'none'
},
plugins: [
new ProgressPlugin(),
new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin({ filename: 'css/[name].css', allChunks: true }),
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].js' }),
......
......@@ -20,6 +20,7 @@ const merge = require('webpack-merge')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const { baseConfig } = require('./config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const ProgressPlugin = require('progress-bar-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
......@@ -96,6 +97,7 @@ const config = merge.smart(baseConfig, {
]
},
plugins: [
new ProgressPlugin(),
new ExtractTextPlugin({ filename: 'css/[name].[contenthash:7].css', allChunks: true }),
new webpack.optimize.CommonsChunkPlugin({ name: 'common', filename: 'js/[name].[hash:7].js' }),
new webpack.optimize.OccurrenceOrderPlugin(),
......
{
"name": "dolphinscheduler",
"version": "1.0.0",
"description": "调度平台前端项目",
"description": "dolphinscheduler",
"author": "gongzijian <gongzijian@analysys.com.cn>",
"scripts": {
"build": "npm run clean && cross-env NODE_ENV=production webpack --config ./build/webpack.config.prod.js",
......@@ -56,16 +56,21 @@
"babel-plugin-transform-runtime": "^6.23.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.6.1",
"copy-webpack-plugin": "^4.5.2",
"cross-env": "^5.2.0",
"css-loader": "^0.28.8",
"html-loader": "^0.5.5",
"html-webpack-ext-plugin": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"cssnano": "4.1.10",
"env-parse": "^1.0.5",
"extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.11",
"globby": "^8.0.1",
"html-loader": "^0.5.5",
"html-webpack-ext-plugin": "^1.0.0",
"html-webpack-plugin": "^3.2.0",
"node-sass": "^4.9.2",
"optimize-css-assets-webpack-plugin": "3.2.0",
"postcss-loader": "^2.1.6",
"progress-bar-webpack-plugin": "^1.12.1",
"rimraf": "^2.6.2",
"sass-loader": "^7.1.0",
"uglifyjs-webpack-plugin": "^1.2.7",
......@@ -75,10 +80,6 @@
"vue-template-compiler": "^2.5.16",
"webpack": "^3.12.0",
"webpack-dev-server": "^2.11.2",
"webpack-merge": "^4.1.4",
"globby": "^8.0.1",
"cssnano": "4.1.10",
"cross-env": "^5.2.0",
"copy-webpack-plugin": "^4.5.2"
"webpack-merge": "^4.1.4"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册