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 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: {

40
package-lock.json generated
View File

@ -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",

View File

@ -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",