Re-Introducing HappyPack (#4669)
* Updating Dev Dependencies (minor version updates) * Re-introduce HappyPack * Added Yarn Lock file * Use HappyPack * Linting * Delete yarn lock file
This commit is contained in:
parent
c3c83086bc
commit
a587815ddc
1
js/.gitignore
vendored
1
js/.gitignore
vendored
@ -8,3 +8,4 @@ docs
|
||||
.happypack
|
||||
.npmjs
|
||||
.eslintcache
|
||||
yarn.lock
|
||||
|
@ -57,28 +57,28 @@
|
||||
"prepush": "npm run lint:cached"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "6.22.2",
|
||||
"babel-core": "6.22.1",
|
||||
"babel-cli": "6.23.0",
|
||||
"babel-core": "6.23.1",
|
||||
"babel-eslint": "7.1.1",
|
||||
"babel-loader": "6.2.10",
|
||||
"babel-loader": "6.3.2",
|
||||
"babel-plugin-lodash": "3.2.11",
|
||||
"babel-plugin-react-intl": "2.3.1",
|
||||
"babel-plugin-recharts": "1.1.0",
|
||||
"babel-plugin-transform-class-properties": "6.22.0",
|
||||
"babel-plugin-transform-class-properties": "6.23.0",
|
||||
"babel-plugin-transform-decorators-legacy": "1.3.4",
|
||||
"babel-plugin-transform-object-rest-spread": "6.22.0",
|
||||
"babel-plugin-transform-react-remove-prop-types": "0.3.0",
|
||||
"babel-plugin-transform-runtime": "6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "6.23.0",
|
||||
"babel-plugin-transform-react-remove-prop-types": "0.3.2",
|
||||
"babel-plugin-transform-runtime": "6.23.0",
|
||||
"babel-plugin-webpack-alias": "2.1.2",
|
||||
"babel-polyfill": "6.22.0",
|
||||
"babel-preset-env": "1.1.8",
|
||||
"babel-polyfill": "6.23.0",
|
||||
"babel-preset-env": "1.1.9",
|
||||
"babel-preset-es2015": "6.22.0",
|
||||
"babel-preset-es2016": "6.22.0",
|
||||
"babel-preset-es2017": "6.22.0",
|
||||
"babel-preset-react": "6.22.0",
|
||||
"babel-preset-react": "6.23.0",
|
||||
"babel-preset-stage-0": "6.22.0",
|
||||
"babel-register": "6.22.0",
|
||||
"babel-runtime": "6.22.0",
|
||||
"babel-register": "6.23.0",
|
||||
"babel-runtime": "6.23.0",
|
||||
"chai": "3.5.0",
|
||||
"chai-as-promised": "6.0.0",
|
||||
"chai-enzyme": "0.6.1",
|
||||
@ -86,62 +86,62 @@
|
||||
"circular-dependency-plugin": "2.0.0",
|
||||
"copy-webpack-plugin": "4.0.1",
|
||||
"core-js": "2.4.1",
|
||||
"coveralls": "2.11.15",
|
||||
"coveralls": "2.11.16",
|
||||
"css-loader": "0.26.1",
|
||||
"ejs-loader": "0.3.0",
|
||||
"ejsify": "1.0.0",
|
||||
"enzyme": "2.7.0",
|
||||
"eslint": "3.11.1",
|
||||
"enzyme": "2.7.1",
|
||||
"eslint": "3.16.1",
|
||||
"eslint-config-semistandard": "7.0.0",
|
||||
"eslint-config-standard": "6.2.1",
|
||||
"eslint-config-standard-react": "4.2.0",
|
||||
"eslint-plugin-promise": "3.4.0",
|
||||
"eslint-plugin-react": "6.8.0",
|
||||
"eslint-plugin-promise": "3.4.2",
|
||||
"eslint-plugin-react": "6.10.0",
|
||||
"eslint-plugin-standard": "2.0.1",
|
||||
"express": "4.14.0",
|
||||
"express": "4.14.1",
|
||||
"extract-loader": "0.1.0",
|
||||
"extract-text-webpack-plugin": "2.0.0-beta.4",
|
||||
"file-loader": "0.9.0",
|
||||
"happypack": "3.0.2",
|
||||
"file-loader": "0.10.0",
|
||||
"happypack": "3.0.3",
|
||||
"html-loader": "0.4.4",
|
||||
"html-webpack-plugin": "2.24.1",
|
||||
"html-webpack-plugin": "2.28.0",
|
||||
"http-proxy-middleware": "0.17.3",
|
||||
"husky": "0.11.9",
|
||||
"husky": "0.13.1",
|
||||
"ignore-styles": "5.0.1",
|
||||
"image-webpack-loader": "3.1.0",
|
||||
"image-webpack-loader": "3.2.0",
|
||||
"istanbul": "1.0.0-alpha.2",
|
||||
"jsdom": "9.9.1",
|
||||
"jsdom": "9.11.0",
|
||||
"json-loader": "0.5.4",
|
||||
"mocha": "3.2.0",
|
||||
"mock-local-storage": "1.0.2",
|
||||
"mock-socket": "6.0.4",
|
||||
"nock": "9.0.2",
|
||||
"postcss-import": "9.0.0",
|
||||
"postcss-loader": "1.2.1",
|
||||
"nock": "9.0.7",
|
||||
"postcss-import": "9.1.0",
|
||||
"postcss-loader": "1.3.2",
|
||||
"postcss-nested": "1.0.0",
|
||||
"postcss-simple-vars": "3.0.0",
|
||||
"progress": "1.1.8",
|
||||
"progress-bar-webpack-plugin": "1.9.1",
|
||||
"progress-bar-webpack-plugin": "1.9.3",
|
||||
"raw-loader": "0.5.1",
|
||||
"react-addons-perf": "15.4.1",
|
||||
"react-addons-test-utils": "15.4.1",
|
||||
"react-addons-perf": "15.4.2",
|
||||
"react-addons-test-utils": "15.4.2",
|
||||
"react-hot-loader": "3.0.0-beta.6",
|
||||
"react-intl-aggregate-webpack-plugin": "0.0.1",
|
||||
"rucksack-css": "0.9.1",
|
||||
"script-ext-html-webpack-plugin": "1.3.5",
|
||||
"serviceworker-webpack-plugin": "0.1.7",
|
||||
"sinon": "1.17.6",
|
||||
"script-ext-html-webpack-plugin": "1.7.1",
|
||||
"serviceworker-webpack-plugin": "0.2.0",
|
||||
"sinon": "1.17.7",
|
||||
"sinon-as-promised": "4.0.2",
|
||||
"sinon-chai": "2.8.0",
|
||||
"style-loader": "0.13.1",
|
||||
"stylelint": "7.7.0",
|
||||
"stylelint-config-standard": "15.0.1",
|
||||
"stylelint": "7.9.0",
|
||||
"stylelint-config-standard": "16.0.0",
|
||||
"to-source": "2.0.3",
|
||||
"url-loader": "0.5.7",
|
||||
"webpack": "2.2.1",
|
||||
"webpack-dev-middleware": "1.9.0",
|
||||
"webpack-dev-middleware": "1.10.1",
|
||||
"webpack-error-notification": "0.1.6",
|
||||
"webpack-hot-middleware": "2.14.0",
|
||||
"webpack-hot-middleware": "2.17.1",
|
||||
"websocket": "1.0.24",
|
||||
"yargs": "6.6.0"
|
||||
},
|
||||
|
@ -18,7 +18,7 @@ import React, { Component, PropTypes } from 'react';
|
||||
|
||||
import { Chip } from 'material-ui';
|
||||
|
||||
import IdentityIcon from '../IdentityIcon' ;
|
||||
import IdentityIcon from '../IdentityIcon';
|
||||
|
||||
import styles from './chip.css';
|
||||
|
||||
|
@ -62,8 +62,7 @@ module.exports = {
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
// use: [ 'happypack/loader?id=js' ]
|
||||
use: isProd ? 'babel-loader' : 'babel-loader?cacheDirectory=true'
|
||||
use: [ 'happypack/loader?id=babel-js' ]
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
@ -96,17 +95,16 @@ module.exports = {
|
||||
test: /\.css$/,
|
||||
include: [ /src/ ],
|
||||
// exclude: [ /src\/dapps/ ],
|
||||
loader: (isProd && !isEmbed) ? ExtractTextPlugin.extract([
|
||||
// 'style-loader',
|
||||
'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
|
||||
'postcss-loader'
|
||||
]) : undefined,
|
||||
// use: [ 'happypack/loader?id=css' ]
|
||||
use: (isProd && !isEmbed) ? undefined : [
|
||||
'style-loader',
|
||||
'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
|
||||
'postcss-loader'
|
||||
]
|
||||
loader: (isProd && !isEmbed)
|
||||
? ExtractTextPlugin.extract([
|
||||
// 'style-loader',
|
||||
'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
|
||||
'postcss-loader'
|
||||
])
|
||||
: undefined,
|
||||
use: (isProd && !isEmbed)
|
||||
? undefined
|
||||
: [ 'happypack/loader?id=css' ]
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ let progressBar = { update: () => {} };
|
||||
|
||||
webpackConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
|
||||
webpackConfig.plugins.push(new webpack.NamedModulesPlugin());
|
||||
webpackConfig.plugins.push(new webpack.NoErrorsPlugin());
|
||||
webpackConfig.plugins.push(new webpack.NoEmitOnErrorsPlugin());
|
||||
|
||||
webpackConfig.plugins.push(new webpack.ProgressPlugin(
|
||||
(percentage) => progressBar.update(percentage)
|
||||
|
@ -17,7 +17,7 @@
|
||||
const webpack = require('webpack');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
// const HappyPack = require('happypack');
|
||||
const HappyPack = require('happypack');
|
||||
|
||||
const postcssImport = require('postcss-import');
|
||||
const postcssNested = require('postcss-nested');
|
||||
@ -85,32 +85,21 @@ function getPlugins (_isProd = isProd) {
|
||||
format: '[:msg] [:bar] ' + ':percent' + ' (:elapsed seconds)'
|
||||
}),
|
||||
|
||||
// NB: HappyPack is not yet working with Webpack 2... (as of Nov. 26)
|
||||
new HappyPack({
|
||||
id: 'css',
|
||||
threads: 4,
|
||||
loaders: [
|
||||
'style-loader',
|
||||
'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
|
||||
'postcss-loader'
|
||||
]
|
||||
}),
|
||||
|
||||
// new HappyPack({
|
||||
// id: 'css',
|
||||
// threads: 4,
|
||||
// loaders: [
|
||||
// 'style-loader',
|
||||
// 'css-loader?modules&sourceMap&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]',
|
||||
// 'postcss-loader'
|
||||
// ]
|
||||
// }),
|
||||
|
||||
// new HappyPack({
|
||||
// id: 'js',
|
||||
// threads: 4,
|
||||
// loaders: _isProd ? ['babel'] : [
|
||||
// 'react-hot-loader',
|
||||
// 'babel-loader?cacheDirectory=true'
|
||||
// ]
|
||||
// }),
|
||||
|
||||
// new HappyPack({
|
||||
// id: 'babel',
|
||||
// threads: 4,
|
||||
// loaders: ['babel-loader']
|
||||
// }),
|
||||
new HappyPack({
|
||||
id: 'babel-js',
|
||||
threads: 4,
|
||||
loaders: [ isProd ? 'babel-loader' : 'babel-loader?cacheDirectory=true' ]
|
||||
}),
|
||||
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
|
@ -44,7 +44,8 @@ let modules = [
|
||||
'recharts',
|
||||
'redux',
|
||||
'redux-thunk',
|
||||
'scryptsy'
|
||||
'scryptsy',
|
||||
'zxcvbn'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
Loading…
Reference in New Issue
Block a user