Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve browser mapping using bare imports (fix #11208) #11219

Merged
merged 4 commits into from Mar 2, 2023

Conversation

hershelh
Copy link
Contributor

@hershelh hershelh commented Dec 6, 2022

Description

When a dep to be resolved has a browser field mapping to a bare import, Vite doesn't resolve that mapping, which is not as expected.

Fixes #11208

Additional context


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.

@hershelh hershelh changed the title fix: resolve browser mapping using bare imports (#11208) fix: resolve browser mapping using bare imports (fix #11208) Dec 6, 2022
@hershelh hershelh force-pushed the bare-import-browser-mapping branch 3 times, most recently from 6700910 to d87d043 Compare December 6, 2022 13:28
@abdelkrimdev
Copy link

Hello 😃
Any updates regarding this PR?

@hershelh
Copy link
Contributor Author

Hello 😃 Any updates regarding this PR?

Waiting for review 😃.

seamossonline pushed a commit to seamossonline/mesh-template--vue2-webpack that referenced this pull request Dec 18, 2022
@smeng9
Copy link
Contributor

smeng9 commented Jan 12, 2023

Hi @sapphi-red

Is there anything I can help to get this minor bug fix merged? Thanks!

@joseph-ismailyan
Copy link

@sapphi-red I'm also looking to get this merged as it's a huge blocker for a project. More than willing to help out!

@denishacquin
Copy link

This is also a huge blocker for me :)

@denishacquin
Copy link

What can be done to get this unstuck? This is a big blocker for a lot of people.

@smeng9
Copy link
Contributor

smeng9 commented Feb 23, 2023

Shall we ask additional reviewers like @bluwy

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make some changes, but the idea of the change LGTM 👍 Gonna run the ecosystem-ci later once the tests here passes.

@bluwy bluwy added this to the 4.2 milestone Feb 27, 2023
@bluwy bluwy added the p3-minor-bug An edge case that only affects very specific usage (priority) label Feb 27, 2023
@patak-dev
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

vite-ecosystem-ci bot commented Feb 27, 2023

📝 Ran ecosystem CI: Open

suite result
astro ✅ success
histoire ❌ failure
iles ✅ success
ladle ✅ success
laravel ✅ success
marko ✅ success
nuxt-framework ✅ success
previewjs ✅ success
qwik ✅ success
rakkas ✅ success
sveltekit ✅ success
vite-plugin-ssr ✅ success
vite-plugin-react ✅ success
vite-plugin-react-pages ❌ failure
vite-plugin-react-swc ✅ success
vite-plugin-svelte ✅ success
vite-plugin-vue ✅ success
vite-setup-catalogue ✅ success
vitepress ✅ success
vitest ✅ success
windicss ✅ success

@bluwy
Copy link
Member

bluwy commented Mar 1, 2023

Forgot to run ecosystem-ci, thanks for handling it patak 😄 Looks like we're good to go, the failures shown were also failing in main. Might be good to get another review before merging.

@bluwy bluwy merged commit 22de84f into vitejs:main Mar 2, 2023
@hershelh hershelh deleted the bare-import-browser-mapping branch March 2, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Vite does not correctly map browser field
7 participants