vite icon indicating copy to clipboard operation
vite copied to clipboard

fix: do not mark already resolved ids as external (optimize deps)

Open patricklx opened this issue 1 year ago • 2 comments

Description

our custom esbuild resolver sometimes resolves an id to a full path and calls build.resolve with it. this causes those paths to be marked as external.

Additional context

i'm not sure if there is a better solution. Ideally i would like to skip all plugins on build.resolve in esbuild, but that option is not available. Is there any alternative?


What is the purpose of this pull request?

  • [X] Bug fix
  • [ ] New Feature
  • [ ] Documentation update
  • [ ] Other

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

  • [X] Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • [ ] Update the corresponding documentation if needed.
  • [ ] Ideally, include relevant tests that fail without this PR but pass with it.

patricklx avatar Dec 21 '23 10:12 patricklx

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Resolved by not passing absolute paths to build.resolve. I still think this is relevant

patricklx avatar Dec 21 '23 16:12 patricklx