diff --git a/js/package.json b/js/package.json index b27b3e20c..ad944dc85 100644 --- a/js/package.json +++ b/js/package.json @@ -68,7 +68,6 @@ "chai": "~3.5.0", "chai-enzyme": "0.4.2", "cheerio": "0.20.0", - "circular-dependency-plugin": "^2.0.0", "copy-webpack-plugin": "~4.0.0", "core-js": "~2.4.1", "coveralls": "~2.11.11", diff --git a/js/src/api/contract/contract.js b/js/src/api/contract/contract.js index 6fe497551..1a4c6f9e6 100644 --- a/js/src/api/contract/contract.js +++ b/js/src/api/contract/contract.js @@ -24,7 +24,9 @@ export default class Contract { constructor (api, abi) { if (!isInstanceOf(api, Api)) { throw new Error('API instance needs to be provided to Contract'); - } else if (!abi) { + } + + if (!abi) { throw new Error('ABI needs to be provided to Contract instance'); } diff --git a/js/webpack/config.js b/js/webpack/config.js index a314f5742..54c07225a 100644 --- a/js/webpack/config.js +++ b/js/webpack/config.js @@ -20,7 +20,6 @@ const path = require('path'); const WebpackErrorNotificationPlugin = require('webpack-error-notification'); const CopyWebpackPlugin = require('copy-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); -const CircularDependencyPlugin = require('circular-dependency-plugin'); const Shared = require('./shared'); const DAPPS = require('../src/dapps'); @@ -132,13 +131,6 @@ module.exports = { template: './index.ejs', favicon: FAVICON, chunks: [ isProd ? null : 'commons', 'index' ] - }), - - new CircularDependencyPlugin({ - // exclude detection of files based on a RegExp - exclude: /node_modules/, - // add errors to webpack instead of warnings - failOnError: true }) ], DAPPS.map((dapp) => { return new HtmlWebpackPlugin({ @@ -155,7 +147,8 @@ module.exports = { plugins.push( new webpack.optimize.CommonsChunkPlugin({ filename: 'commons.[hash].js', - name: 'commons' + name: 'commons', + minChunks: Infinity }) ); }