|
@@ -1,5 +1,6 @@
|
1
|
1
|
/* global __dirname */
|
2
|
2
|
|
|
3
|
+const CircularDependencyPlugin = require('circular-dependency-plugin');
|
3
|
4
|
const process = require('process');
|
4
|
5
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
5
|
6
|
|
|
@@ -11,6 +12,7 @@ const devServerProxyTarget
|
11
|
12
|
= process.env.WEBPACK_DEV_SERVER_PROXY_TARGET || 'https://alpha.jitsi.net';
|
12
|
13
|
|
13
|
14
|
const analyzeBundle = process.argv.indexOf('--analyze-bundle') !== -1;
|
|
15
|
+const detectCircularDeps = process.argv.indexOf('--detect-circular-deps') !== -1;
|
14
|
16
|
|
15
|
17
|
const minimize
|
16
|
18
|
= process.argv.indexOf('-p') !== -1
|
|
@@ -155,6 +157,12 @@ const config = {
|
155
|
157
|
&& new BundleAnalyzerPlugin({
|
156
|
158
|
analyzerMode: 'disabled',
|
157
|
159
|
generateStatsFile: true
|
|
160
|
+ }),
|
|
161
|
+ detectCircularDeps
|
|
162
|
+ && new CircularDependencyPlugin({
|
|
163
|
+ allowAsyncCycles: false,
|
|
164
|
+ exclude: /node_modules/,
|
|
165
|
+ failOnError: false
|
158
|
166
|
})
|
159
|
167
|
].filter(Boolean),
|
160
|
168
|
resolve: {
|