|
@@ -5,6 +5,7 @@ const ESLintPlugin = require('eslint-webpack-plugin');
|
|
|
const ExtraneousFileCleanupPlugin = require('webpack-extraneous-file-cleanup-plugin');
|
|
|
const CompressionPlugin = require("compression-webpack-plugin");
|
|
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
|
|
+const CircularDependencyPlugin = require('circular-dependency-plugin')
|
|
|
|
|
|
const utils = require('./utils')
|
|
|
|
|
@@ -13,6 +14,8 @@ const langPath = 'web/sites/default/files/lang'
|
|
|
|
|
|
const isDev = process.env.NODE_ENV === 'development';
|
|
|
|
|
|
+
|
|
|
+
|
|
|
module.exports = {
|
|
|
resolve: {
|
|
|
extensions: ['.js', '.vue', '.json'],
|
|
@@ -172,5 +175,18 @@ module.exports = {
|
|
|
* See `Options and Defaults` for information
|
|
|
*/
|
|
|
new CleanWebpackPlugin(),
|
|
|
+ new CircularDependencyPlugin({
|
|
|
+ // exclude detection of files based on a RegExp
|
|
|
+ exclude: /a\.js|node_modules/,
|
|
|
+ // include specific files based on a RegExp
|
|
|
+ // include: /dir/,
|
|
|
+ // add errors to webpack instead of warnings
|
|
|
+ failOnError: false,
|
|
|
+ // allow import cycles that include an asyncronous import,
|
|
|
+ // e.g. via import(/* webpackMode: "weak" */ './file.js')
|
|
|
+ allowAsyncCycles: false,
|
|
|
+ // set the current working directory for displaying module paths
|
|
|
+ // cwd: process.cwd(),
|
|
|
+ })
|
|
|
]
|
|
|
}
|