Skip to content

Commit 2cb58b9

Browse files
authored
fix(webpack): Webpack and Rspack ignore warnings should concat all rules instead of overwrite them. (#29112)
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #18243
1 parent 08a3307 commit 2cb58b9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/rspack/src/plugins/utils/apply-base-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ function applyNxIndependentConfig(
134134
IGNORED_RSPACK_WARNINGS.some((r) =>
135135
typeof x === 'string' ? r.test(x) : r.test(x.message)
136136
),
137+
...(config.ignoreWarnings ?? []),
137138
];
138139

139140
config.optimization = !isProd

packages/webpack/src/plugins/nx-webpack-plugin/lib/apply-base-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ function applyNxIndependentConfig(
137137
IGNORED_WEBPACK_WARNINGS.some((r) =>
138138
typeof x === 'string' ? r.test(x) : r.test(x.message)
139139
),
140+
...(config.ignoreWarnings ?? []),
140141
];
141142

142143
config.optimization = {

0 commit comments

Comments
 (0)