Skip to content

Commit f57ca63

Browse files
committed
🔧 Disable cleanUrls in serve command
1 parent a75eb7d commit f57ca63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/commands/serveCommand.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ export function serveCommand(): (stepParams: StepParams) => Promise<void> {
2323
const start = Date.now()
2424
await handler(request, response, {
2525
public: config.output.path ?? "build",
26+
cleanUrls: ["/", "!/*"],
2627
})
2728
console.log(request.method, request.url)
2829
console.log(
2930
"Returned",
3031
(response.statusCode === 200 ? chalk.green : chalk.red)(response.statusCode),
3132
"in",
3233
Date.now() - start,
33-
"ms"
34+
"ms",
3435
)
3536
}
3637

@@ -40,8 +41,8 @@ export function serveCommand(): (stepParams: StepParams) => Promise<void> {
4041
key,
4142
cert,
4243
},
43-
requestHandler
44-
)
44+
requestHandler,
45+
)
4546
: http.createServer(requestHandler)
4647

4748
server.listen(port, () => {

0 commit comments

Comments
 (0)