Skip to content

Commit

Permalink
fix!: do not fixStacktrace by default (#7995)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed May 23, 2022
1 parent 9e2a1ea commit 23f8e08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -13,7 +13,7 @@ test('always throw error when evaluating an wrong SSR module', async () => {
const expectedErrors = []
for (const _ of [0, 1]) {
try {
await viteServer.ssrLoadModule(badjs)
await viteServer.ssrLoadModule(badjs, { fixStacktrace: true })
} catch (e) {
expectedErrors.push(e)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/ssr/ssrModuleLoader.ts
Expand Up @@ -206,7 +206,7 @@ async function instantiateModule(
)
} catch (e) {
mod.ssrError = e
if (e.stack && fixStacktrace !== false) {
if (e.stack && fixStacktrace) {
const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph)
rebindErrorStacktrace(e, stacktrace)
server.config.logger.error(
Expand Down

0 comments on commit 23f8e08

Please sign in to comment.