Skip to content

Commit

Permalink
feat(config): only warn while experiments.newSplitChunks being expl…
Browse files Browse the repository at this point in the history
…icitly setted (#4174)

* feat(config): only warn while `experiments.newSplitChunks` being explicitly setted

* Fix
  • Loading branch information
hyf0 authored Sep 12, 2023
1 parent a315f9b commit b5ae3a4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/rspack/src/config/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,10 +944,12 @@ const experiments = z.strictObject({
newSplitChunks: z
.boolean()
.optional()
.refine(_ => {
console.warn(
"`experiments.newSplitChunks` will be removed at 0.4.0. See details at https://github.com/web-infra-dev/rspack/discussions/4168"
);
.refine(val => {
if (val === false || val === true) {
console.warn(
"`experiments.newSplitChunks` will be removed at 0.4.0. See details at https://github.com/web-infra-dev/rspack/discussions/4168"
);
}
return true;
}),
css: z.boolean().optional(),
Expand Down

0 comments on commit b5ae3a4

Please sign in to comment.