Skip to content

Commit

Permalink
fix(builder): incorrect devMiddleware schema (#4623)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan authored Sep 12, 2023
1 parent b32d3dc commit f509548
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/strong-suits-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/builder-shared': patch
---

fix(builder): incorrect devMiddleware schema

fix(builder): 修复 devMiddleware 的 schema 错误
3 changes: 2 additions & 1 deletion packages/builder/builder-shared/src/schema/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ const sharedDevServerConfigSchema = z.partialObj({
port: z.string(),
host: z.string(),
}),
devMiddleware: z.object({
devMiddleware: z.partialObj({
writeToDisk: z.union([
z.boolean(),
z.function().args(z.string()).returns(z.boolean()),
]),
outputFileSystem: z.record(z.any()),
}),
historyApiFallback: z.union([z.boolean(), z.record(z.unknown())]),
compress: z.boolean(),
Expand Down

0 comments on commit f509548

Please sign in to comment.