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

complex package.json#browser field handling #294

Closed
csr632 opened this issue May 29, 2020 · 2 comments · Fixed by #301
Closed

complex package.json#browser field handling #294

csr632 opened this issue May 29, 2020 · 2 comments · Fixed by #301

Comments

@csr632
Copy link
Member

csr632 commented May 29, 2020

Currently we only support string type "browser" field in package.json: https://github.com/vuejs/vite/blob/801951e28a92aaf7437647094081825ec308e645/src/node/resolver.ts#L337 . But it can be an object. For example, styled-components.

So technically, "browser" is different from "module" or "main". It should not be treated as "mainField" . In webpack, it belong to a different config.

More context:

@FallenMax
Copy link

+1, also breaks axios

@csr632
Copy link
Member Author

csr632 commented May 29, 2020

I am working on this

csr632 added a commit to csr632/vite that referenced this issue May 29, 2020
csr632 added a commit to csr632/vite that referenced this issue May 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants