Skip to content

Conversation

@bluwy
Copy link
Member

@bluwy bluwy commented Jan 13, 2022

Description

Fixes sveltejs/kit#3118

If require() an absolute path, use default node resolution algorithm instead of Vite's.

Additional context

Question: Does SSR transform rewrite paths for require(...) to absolute? If so, this might not be the best solution then.


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.

@bluwy bluwy added feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority) labels Jan 13, 2022
@bluwy bluwy requested a review from aleclarson January 13, 2022 06:40
@aleclarson aleclarson changed the title fix(ssr): skip vite resolve if id is absolute fix(ssr): avoid using tryNodeResolve on absolute paths Jan 13, 2022
@aleclarson aleclarson merged commit f346d89 into vitejs:main Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: ssr p3-minor-bug An edge case that only affects very specific usage (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

importing sqlite3 fails in dev mode

3 participants