Skip to content

Commit

Permalink
chore: remove ssrFixStacktrace from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed May 7, 2021
1 parent 744bb6a commit 69ac90c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
4 changes: 0 additions & 4 deletions docs/guide/api-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ interface ViteDevServer {
url: string,
options?: { isolated?: boolean }
): Promise<Record<string, any>>
/**
* Fix ssr error stacktrace.
*/
ssrFixStacktrace(e: Error): void
/**
* Start the server.
*/
Expand Down
3 changes: 0 additions & 3 deletions docs/guide/ssr.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ app.use('*', async (req, res) => {
// 6. Send the rendered HTML back.
res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
} catch (e) {
// If an error is caught, let vite fix the stracktrace so it maps back to
// your actual source code.
vite.ssrFixStacktrace(e)
console.error(e)
res.status(500).end(e.message)
}
Expand Down
1 change: 0 additions & 1 deletion packages/playground/ssr-react/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ async function createServer(

res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
} catch (e) {
!isProd && vite.ssrFixStacktrace(e)
console.log(e.stack)
res.status(500).end(e.stack)
}
Expand Down
1 change: 0 additions & 1 deletion packages/playground/ssr-vue/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ async function createServer(

res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
} catch (e) {
vite && vite.ssrFixStacktrace(e)
console.log(e.stack)
res.status(500).end(e.stack)
}
Expand Down
1 change: 1 addition & 0 deletions packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ export interface ViteDevServer {
ssrLoadModule(url: string): Promise<Record<string, any>>
/**
* Fix ssr error stacktrace
* @deprecated we now rely on source-map support for ssr.
*/
ssrFixStacktrace(e: Error): void
/**
Expand Down

0 comments on commit 69ac90c

Please sign in to comment.