Re-add happypack for babel builds

This commit is contained in:
Jaco Greeff 2017-08-01 18:11:35 +02:00
parent 34a8daa629
commit aa95c09a88
5 changed files with 15 additions and 14 deletions

View File

@ -66,11 +66,11 @@ module.exports = {
{
test: /\.js$/,
exclude: /(node_modules)/,
use: [ 'babel-loader' ]
use: [ 'happypack/loader?id=babel' ]
},
{
test: /\.json$/,
use: [ 'json-loader' ]
use: ['json-loader']
},
{
test: /\.ejs$/,
@ -97,7 +97,7 @@ module.exports = {
},
{
test: /\.md$/,
use: [ 'html-loader', 'markdown-loader' ]
use: ['html-loader', 'markdown-loader']
},
{
test: /\.css$/,
@ -121,7 +121,8 @@ module.exports = {
{
loader: 'postcss-loader',
options: {
plugins: (loader) => [
sourceMap: true,
plugins: [
require('postcss-import'),
require('postcss-nested'),
require('postcss-simple-vars')

View File

@ -55,11 +55,11 @@ module.exports = {
{
test: /\.js$/,
exclude: /node_modules/,
use: [ 'babel-loader' ]
use: [ 'happypack/loader?id=babel' ]
},
{
test: /\.json$/,
use: [ 'json-loader' ]
use: ['json-loader']
},
{
test: /\.html$/,

View File

@ -17,5 +17,5 @@
module.exports = {
test: /\.js$/,
include: /node_modules\/(get-own-enumerable-property-symbols|ethereumjs-tx|stringify-object)/,
use: [ 'babel-loader' ]
use: [ 'happypack/loader?id=babel' ]
};

View File

@ -17,5 +17,5 @@
module.exports = {
test: /\.js$/,
include: /node_modules\/@parity\//,
use: [ 'babel-loader' ]
use: [ 'happypack/loader?id=babel' ]
};

View File

@ -18,7 +18,7 @@ const webpack = require('webpack');
const path = require('path');
const fs = require('fs');
// const HappyPack = require('happypack');
const HappyPack = require('happypack');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const PackageJson = require('../package.json');
@ -83,12 +83,12 @@ function getPlugins (_isProd = isProd) {
LOGGING: JSON.stringify(!isProd),
UI_VERSION: JSON.stringify(UI_VERSION)
}
}),
new HappyPack({
id: 'babel',
threads: 4,
loaders: ['babel-loader']
})
// new HappyPack({
// id: 'babel',
// threads: 4,
// loaders: [ 'babel-loader' ]
// })
];
if (_isProd) {