Skip to content

Commit 7d59020

Browse files
committed
Moving circular to dev dep
1 parent 1657842 commit 7d59020

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"@sentry/webpack-plugin": "^2.5.0",
6161
"babel-runtime": "^6.26.0",
6262
"chroma-js": "^2.4.2",
63-
"circular-dependency-plugin": "^5.2.2",
6463
"classnames": "^2.3.1",
6564
"d3-scale-chromatic": "^3.0.0",
6665
"dayjs": "^1.11.7",
@@ -135,6 +134,7 @@
135134
"typescript": "^4.8.4",
136135
"webpack": "^5.77.0",
137136
"webpack-cli": "^4.9.1",
138-
"webpack-dev-server": "^4.7.3"
137+
"webpack-dev-server": "^4.7.3",
138+
"circular-dependency-plugin": "^5.2.2"
139139
}
140140
}

webpack.config.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
22
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');
33
const CircularDependencyPlugin = require('circular-dependency-plugin');
4+
5+
const circularPlugin = new CircularDependencyPlugin({
6+
// exclude detection of files based on a RegExp
7+
exclude: /a\.js|node_modules/,
8+
// add errors to webpack instead of warnings
9+
failOnError: false,
10+
// allow import cycles that include an asyncronous import,
11+
// e.g. via import(/* webpackMode: "weak" */ './file.js')
12+
allowAsyncCycles: false,
13+
// set the current working directory for displaying module paths
14+
cwd: process.cwd(),
15+
});
16+
17+
const circularValidation = false;
18+
419
const rules = [
520
{
621
test: /\.(js|jsx|ts|tsx)$/,
@@ -61,20 +76,7 @@ module.exports = (env) => {
6176
project: 'neodash',
6277
}),
6378
]
64-
: [
65-
new ReactRefreshWebpackPlugin(),
66-
// new CircularDependencyPlugin({
67-
// // exclude detection of files based on a RegExp
68-
// exclude: /a\.js|node_modules/,
69-
// // add errors to webpack instead of warnings
70-
// failOnError: false,
71-
// // allow import cycles that include an asyncronous import,
72-
// // e.g. via import(/* webpackMode: "weak" */ './file.js')
73-
// allowAsyncCycles: false,
74-
// // set the current working directory for displaying module paths
75-
// cwd: process.cwd(),
76-
// }),
77-
],
79+
: [new ReactRefreshWebpackPlugin(), ...(circularValidation ? [circularPlugin] : [])],
7880
ignoreWarnings: [/Failed to parse source map/],
7981
};
8082
};

yarn.lock

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,13 +2317,6 @@
23172317
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.12.3.tgz#3dffe62dccc065ddd7338e97d7be4b917004287e"
23182318
integrity sha512-yiJZ+knaknPHuRKhRk4L6XiwppwkAahVal3LuYpvBH7GkA2g+D9WLEXOEnNYtVFUggyKf6fWGLGnx0iqzkU5YA==
23192319

2320-
"@mui/icons-material@^5.11.16":
2321-
version "5.11.16"
2322-
resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.11.16.tgz#417fa773c56672e39d6ccfed9ac55591985f0d38"
2323-
integrity sha512-oKkx9z9Kwg40NtcIajF9uOXhxiyTZrrm9nmIJ4UjkU2IdHpd4QVLbCc/5hZN/y0C6qzi2Zlxyr9TGddQx2vx2A==
2324-
dependencies:
2325-
"@babel/runtime" "^7.21.0"
2326-
23272320
"@mui/material@^5.12.3":
23282321
version "5.12.3"
23292322
resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.12.3.tgz#398c1b123fb065763558bc1f9fc47d1f8cb87d0c"

0 commit comments

Comments
 (0)