Skip to content

Commit

Permalink
fix(ui): don't cache coverage assets (#3508)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin authored Jun 5, 2023
1 parent 5fc6aa2 commit 952b5be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ui/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export default (ctx: Vitest) => {
coverageFolder && server.middlewares.use(coveragePath!, sirv(coverageFolder, {
single: true,
dev: true,
setHeaders: (res) => {
res.setHeader('Cache-Control', 'public,max-age=0,must-revalidate')
},
}))
const clientDist = resolve(fileURLToPath(import.meta.url), '../client')
server.middlewares.use(base, sirv(clientDist, {
Expand Down

0 comments on commit 952b5be

Please sign in to comment.