Skip to content

feat: add fixStacktrace option to ssrLoadModule#7048

Merged
patak-cat merged 1 commit intovitejs:mainfrom
benmccann:fixStacktrace
Feb 25, 2022
Merged

feat: add fixStacktrace option to ssrLoadModule#7048
patak-cat merged 1 commit intovitejs:mainfrom
benmccann:fixStacktrace

Conversation

@benmccann
Copy link
Copy Markdown
Collaborator

@benmccann benmccann commented Feb 22, 2022

Description

Closes #7046

Additional context

We've gotten a number of bug reports in SvelteKit about stack traces being incorrect. It turns out that's because Vite fixes the stack traces and then we fix them again. While conceptually we should be able to address this purely in our own code, in practice it's been quite difficult given the way our code is currently structured and the number of different places we call ssrLoadModule. We'd like to just be able to wrap all the code in a single try / catch, but without this feature would need to break it into about fifteen different blocks across different classes.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@benmccann benmccann added feat: ssr p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority) labels Feb 22, 2022
@patak-cat
Copy link
Copy Markdown
Member

patak-cat commented Feb 23, 2022

Interesting that an unused isolated param was there. This looks good to me, I've added it for discussion with the team in our next meeting. ( edit: it was already there :) )

@patak-cat
Copy link
Copy Markdown
Member

We discussed this PR today with the team and we think it is good to go forward with it 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: ssr p3-downstream-blocker Blocking the downstream ecosystem to work properly (priority)

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Make auto-fixing of stack traces optional when using ssrLoadModule

2 participants