diff --git a/package.json b/package.json index c7bb99d..d586638 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "babel-preset-stage-0": "^6.3.13", "babel-runtime": "^6.0.0", "bundle-loader": "^0.5.4", + "circular-dependency-plugin": "^2.0.0", "css-loader": "^0.23.0", "enzyme": "^2.2.0", "eslint": "^3.1.1", diff --git a/webpack.config.js b/webpack.config.js index 2fa1959..d0a4a70 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ const webpack = require('webpack'); const loaderUtils = require('loader-utils'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); +const CircularDependencyPlugin = require('circular-dependency-plugin'); const cssUrl = require('webpack-utils/cssUrl'); const cssImport = require('postcss-import'); @@ -247,7 +248,11 @@ if (isProduction) { if (!isProduction && !isTest) { webpackConfig.plugins.push( new webpack.HotModuleReplacementPlugin(), - new webpack.NoErrorsPlugin() + new webpack.NoErrorsPlugin(), + new CircularDependencyPlugin({ + exclude: /node_modules/, + failOnError: false + }) ); if (config.apiHost) {