From 41ce154bcbc1247457026ba0b9e967c911029bb1 Mon Sep 17 00:00:00 2001 From: "zhigang.li" Date: Mon, 11 Dec 2017 14:30:39 +0800 Subject: [PATCH] remove happypack --- build/webpack.base.config.js | 16 +++------------ package-lock.json | 40 ++---------------------------------- package.json | 1 - 3 files changed, 5 insertions(+), 52 deletions(-) diff --git a/build/webpack.base.config.js b/build/webpack.base.config.js index 03647808..231bcbcd 100755 --- a/build/webpack.base.config.js +++ b/build/webpack.base.config.js @@ -2,8 +2,6 @@ const path = require('path'); const os = require('os'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const HappyPack = require('happypack'); -var happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length }); function resolve (dir) { return path.join(__dirname, dir); @@ -45,19 +43,19 @@ module.exports = { }, { test: /iview\/.*?js$/, - loader: 'happypack/loader?id=happybabel', + loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.js$/, - loader: 'happypack/loader?id=happybabel', + loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.js[x]?$/, include: [resolve('src')], exclude: /node_modules/, - loader: 'happypack/loader?id=happybabel' + loader: 'babel-loader' }, { test: /\.css$/, @@ -83,14 +81,6 @@ module.exports = { } ] }, - plugins: [ - new HappyPack({ - id: 'happybabel', - loaders: ['babel-loader'], - threadPool: happyThreadPool, - verbose: true - }) - ], resolve: { extensions: ['.js', '.vue'], alias: { diff --git a/package-lock.json b/package-lock.json index 1979dbe9..4998aa7d 100755 --- a/package-lock.json +++ b/package-lock.json @@ -4719,37 +4719,6 @@ "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", "dev": true }, - "happypack": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/happypack/-/happypack-4.0.0.tgz", - "integrity": "sha1-3hdw1HLasz4/MXgqPttOd8xlhjE=", - "dev": true, - "requires": { - "async": "1.5.0", - "json-stringify-safe": "5.0.1", - "loader-utils": "1.1.0", - "serialize-error": "2.1.0" - }, - "dependencies": { - "async": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.0.tgz", - "integrity": "sha1-J5ZkJyNXOFlWVjP8YnRES+4vjOM=", - "dev": true - }, - "loader-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", - "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", - "dev": true, - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1" - } - } - } - }, "har-schema": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", @@ -5821,7 +5790,8 @@ "version": "5.0.1", "resolved": "http://r.cnpmjs.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "dev": true, + "optional": true }, "json3": { "version": "3.3.2", @@ -8356,12 +8326,6 @@ } } }, - "serialize-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=", - "dev": true - }, "serve-index": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", diff --git a/package.json b/package.json index 486d8203..9d3ccf60 100755 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "eslint-plugin-standard": "^3.0.1", "extract-text-webpack-plugin": "^3.0.2", "file-loader": "^1.1.5", - "happypack": "^4.0.0", "html-loader": "^0.5.1", "html-webpack-plugin": "^2.28.0", "less": "^2.7.3",