-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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): improve browser filed substitutions #2701
Conversation
Would it work with |
Thanks a lot for this PR @fi3ework and the detailed explanation and links! 💯 |
I think @ljharb is right, that ideally
instead of relying on contraptions like that. |
@Timsonrobl as Evan Wallace said, he was following webpack as much as possible because it is what currently most projects were using. I think we could merge this PR that already fixes several issues at this point. And we could later have another PR to improve this further if you or someone else would like to add more test cases and review the diffs with other tools. |
@fi3ework Could you merge main into your branch? (Or rebase) |
@Shinigami92 Done, appveyor passed. 😆 |
Description
Fixes #2598.
Browser filed spec is unmaintained, this issue of esbuild has made a detailed explaination. I think Vite can use the same strategy as esbuild to handle browser field. This PR also refers to test case of esbuild.
Additional context
Didn't mapping all test case from esbuild. I think its test case is a bit redundant.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).