Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: show error if vite client cannot be loaded
  • Loading branch information
benmccann committed Jun 11, 2024
commit 1f774b24f0ea3199d34a23a3b1b1409955154fbb
2 changes: 2 additions & 0 deletions packages/vite/src/node/server/middlewares/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export function errorMiddleware(
</script>
</head>
<body>
<h1>Internal Server Error</h1>
<pre>${err.stack?.replace(/</g, '&lt;')}</pre>
</body>
</html>
`)
Expand Down
2 changes: 1 addition & 1 deletion playground/html/__tests__/html.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ describe.runIf(isServe)('invalid', () => {
const errorOverlay = await page.waitForSelector('vite-error-overlay')
expect(errorOverlay).toBeTruthy()

await page.click('html')
await page.click('html', { position: { x: 50, y: 50 } })
const isVisbleOverlay = await errorOverlay.isVisible()
expect(isVisbleOverlay).toBeFalsy()
})
Expand Down