diff --git a/js/webpack/app.js b/js/webpack/app.js index bcdaf9f0f..ac485554a 100644 --- a/js/webpack/app.js +++ b/js/webpack/app.js @@ -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') diff --git a/js/webpack/libraries.js b/js/webpack/libraries.js index c0619eb41..da905cb4c 100644 --- a/js/webpack/libraries.js +++ b/js/webpack/libraries.js @@ -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$/, diff --git a/js/webpack/rules/es6.js b/js/webpack/rules/es6.js index 292b64830..d6e7e58e6 100644 --- a/js/webpack/rules/es6.js +++ b/js/webpack/rules/es6.js @@ -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' ] }; diff --git a/js/webpack/rules/parity.js b/js/webpack/rules/parity.js index eb577d99a..546bbc659 100644 --- a/js/webpack/rules/parity.js +++ b/js/webpack/rules/parity.js @@ -17,5 +17,5 @@ module.exports = { test: /\.js$/, include: /node_modules\/@parity\//, - use: [ 'babel-loader' ] + use: [ 'happypack/loader?id=babel' ] }; diff --git a/js/webpack/shared.js b/js/webpack/shared.js index c1994c8b3..b65856966 100644 --- a/js/webpack/shared.js +++ b/js/webpack/shared.js @@ -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) {