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

browser field in package.json #2345

Closed
alex35mil opened this issue Apr 8, 2017 · 3 comments
Closed

browser field in package.json #2345

alex35mil opened this issue Apr 8, 2017 · 3 comments

Comments

@alex35mil
Copy link
Contributor

alex35mil commented Apr 8, 2017

If next release will be published w/ browser field in package.json, then webpack will be using umd build on bundling instead of module/main builds.

Webpack issue: webpack/webpack#4674

@timdorr
Copy link
Member

timdorr commented Apr 25, 2017

Sorry, I thought I responded to this. Must have been in my head...

But yeah, this would seem to be a problem. However, we're looking at bundling the es/cjs builds as well (#2358), so maybe it won't be an issue then?

@alex35mil
Copy link
Contributor Author

However, we're looking at bundling the es/cjs builds as well (#2358), so maybe it won't be an issue then?

@timdorr I'm afraid it's still an issue w/ default configuration of webpack. If target is set to web (default), then browser field takes precedence over the others.

Link: https://webpack.js.org/configuration/resolve/#resolve-mainfields

I think it makes sense to remove this field in #2358 (or I can submit another PR).

@timdorr
Copy link
Member

timdorr commented Jun 15, 2017

I finally got rid of this. Thanks for the heads up!

seantcoyote pushed a commit to seantcoyote/redux that referenced this issue Jan 14, 2018
This is picked up in Webpack by default and will cause all sorts of headaches. Fixes reduxjs#2345
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

No branches or pull requests

2 participants