Added Webpack check circular deps

This commit is contained in:
Nicolas Gotchac 2016-11-26 16:53:24 +01:00
parent f77afd072b
commit 002c793f53
2 changed files with 9 additions and 0 deletions

View File

@ -68,6 +68,7 @@
"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",

View File

@ -20,6 +20,7 @@ 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');
@ -131,6 +132,13 @@ 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({