mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-13 08:51:38 +08:00
Merge pull request #19858 from dannon/circular-dependency-elim
Client circular dependency check
This commit is contained in:
@@ -165,6 +165,7 @@
|
||||
"babel-jest": "^29.7.0",
|
||||
"babel-plugin-transform-import-meta": "^2.2.1",
|
||||
"buffer": "^6.0.3",
|
||||
"circular-dependency-plugin": "^5.2.2",
|
||||
"cpy-cli": "^5.0.0",
|
||||
"css-loader": "^7.1.2",
|
||||
"css-minimizer-webpack-plugin": "^5.0.1",
|
||||
|
||||
@@ -8,6 +8,7 @@ const { DumpMetaPlugin } = require("dumpmeta-webpack-plugin");
|
||||
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
||||
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
||||
|
||||
const scriptsBase = path.join(__dirname, "src");
|
||||
const testsBase = path.join(__dirname, "tests");
|
||||
@@ -301,6 +302,23 @@ module.exports = (env = {}, argv = {}) => {
|
||||
},
|
||||
};
|
||||
|
||||
// Only include CircularDependencyPlugin in development mode
|
||||
if (targetEnv === "development") {
|
||||
buildconfig.plugins.push(
|
||||
new CircularDependencyPlugin({
|
||||
// exclude detection of files based on a RegExp
|
||||
exclude: /a\.js|node_modules|src\/libs/,
|
||||
// add errors to webpack instead of warnings
|
||||
failOnError: !!process.env.CIRCULAR_DEPENDENCY_FAIL_ON_ERROR,
|
||||
// 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(),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.GXY_BUILD_SOURCEMAPS) {
|
||||
buildconfig.devtool = "eval-cheap-module-source-map";
|
||||
}
|
||||
|
||||
@@ -4397,6 +4397,11 @@ ci-info@^3.2.0:
|
||||
resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz"
|
||||
integrity sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==
|
||||
|
||||
circular-dependency-plugin@^5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz#39e836079db1d3cf2f988dc48c5188a44058b600"
|
||||
integrity sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==
|
||||
|
||||
circular-json@^0.5.0:
|
||||
version "0.5.9"
|
||||
resolved "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz"
|
||||
|
||||
Reference in New Issue
Block a user