Skip to content

Commit

Permalink
chore: update fixStacktrace default
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed May 20, 2022
1 parent a69a667 commit f8e8286
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -11,7 +11,7 @@ test('always throw error when evaluating an wrong SSR module', async () => {
const expectedErrors = []
for (const i 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 f8e8286

Please sign in to comment.