Skip to content

Commit

Permalink
feat(config): warn while using experiments.newSplitChunks (#4169)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyf0 authored Sep 11, 2023
1 parent 77bada1 commit 254d31d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/rspack/src/config/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,15 @@ const experiments = z.strictObject({
incrementalRebuild: z.boolean().or(incrementalRebuildOptions).optional(),
asyncWebAssembly: z.boolean().optional(),
outputModule: z.boolean().optional(),
newSplitChunks: z.boolean().optional(),
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"
);
return true;
}),
css: z.boolean().optional(),
futureDefaults: z.boolean().optional(),
rspackFuture: rspackFutureOptions.optional()
Expand Down

0 comments on commit 254d31d

Please sign in to comment.