remove happypack

This commit is contained in:
zhigang.li 2017-12-11 14:30:39 +08:00
parent 669cb1bdc4
commit 41ce154bcb
3 changed files with 5 additions and 52 deletions

View File

@ -2,8 +2,6 @@ const path = require('path');
const os = require('os'); const os = require('os');
const webpack = require('webpack'); const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HappyPack = require('happypack');
var happyThreadPool = HappyPack.ThreadPool({ size: os.cpus().length });
function resolve (dir) { function resolve (dir) {
return path.join(__dirname, dir); return path.join(__dirname, dir);
@ -45,19 +43,19 @@ module.exports = {
}, },
{ {
test: /iview\/.*?js$/, test: /iview\/.*?js$/,
loader: 'happypack/loader?id=happybabel', loader: 'babel-loader',
exclude: /node_modules/ exclude: /node_modules/
}, },
{ {
test: /\.js$/, test: /\.js$/,
loader: 'happypack/loader?id=happybabel', loader: 'babel-loader',
exclude: /node_modules/ exclude: /node_modules/
}, },
{ {
test: /\.js[x]?$/, test: /\.js[x]?$/,
include: [resolve('src')], include: [resolve('src')],
exclude: /node_modules/, exclude: /node_modules/,
loader: 'happypack/loader?id=happybabel' loader: 'babel-loader'
}, },
{ {
test: /\.css$/, test: /\.css$/,
@ -83,14 +81,6 @@ module.exports = {
} }
] ]
}, },
plugins: [
new HappyPack({
id: 'happybabel',
loaders: ['babel-loader'],
threadPool: happyThreadPool,
verbose: true
})
],
resolve: { resolve: {
extensions: ['.js', '.vue'], extensions: ['.js', '.vue'],
alias: { alias: {

40
package-lock.json generated
View File

@ -4719,37 +4719,6 @@
"integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=", "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ=",
"dev": true "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": { "har-schema": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
@ -5821,7 +5790,8 @@
"version": "5.0.1", "version": "5.0.1",
"resolved": "http://r.cnpmjs.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", "resolved": "http://r.cnpmjs.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
"dev": true "dev": true,
"optional": true
}, },
"json3": { "json3": {
"version": "3.3.2", "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": { "serve-index": {
"version": "1.9.1", "version": "1.9.1",
"resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",

View File

@ -60,7 +60,6 @@
"eslint-plugin-standard": "^3.0.1", "eslint-plugin-standard": "^3.0.1",
"extract-text-webpack-plugin": "^3.0.2", "extract-text-webpack-plugin": "^3.0.2",
"file-loader": "^1.1.5", "file-loader": "^1.1.5",
"happypack": "^4.0.0",
"html-loader": "^0.5.1", "html-loader": "^0.5.1",
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.28.0",
"less": "^2.7.3", "less": "^2.7.3",