Skip to content

fix: avoid different imports of the same module (fix #7621)#9730

Closed
meteorlxy wants to merge 1 commit intovitejs:mainfrom
meteorlxy:patch-1
Closed

fix: avoid different imports of the same module (fix #7621)#9730
meteorlxy wants to merge 1 commit intovitejs:mainfrom
meteorlxy:patch-1

Conversation

@meteorlxy
Copy link
Contributor

Description

Fix #7621, #2503


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
Copy link
Member

bluwy commented Aug 21, 2022

I'm a bit worried about this fix as it removes code from resolve.ts which others may rely on when using pluginContainer.resolveId or config.createResolver. Also I've submitted #9759 which might fix the issue too though I haven't confirmed yet. We'd also want tests for this if others are comfortable of this change.

@meteorlxy
Copy link
Contributor Author

meteorlxy commented Aug 21, 2022

@bluwy Hi, thanks for your response. I just had a test on https://github.com/meteorlxy/repro-vite-2503 with the current main branch, and the issue is still here.

I can confirm that this PR would fix that issue, and vuepress-next would finally work well with vite3. But now we got stuck with the problem.

BTW I think this would also be helpful for sveltejs/kit#5952, but I'm not familiar with sveltekit yet

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug report] importing dependencies by fs paths results in two different copies of the same module (Same as #2503)

2 participants