add browser field in package.json#2060
Conversation
Pull Request Test Coverage Report for Build 2926
💛 - Coveralls |
|
The browser field can be used to override the “main” for browsers. This change point browsers to the same file so I don’t think it makes a difference. |
|
webpack checks field in People can change webpack configuration to make it work, but it's extra burden for them and sometimes is not obvious to people who don't know webpack well. Having |
|
Thank you for clarifying. Now I understand. |
|
@Feiyang1 Why did we not choose the prebuilt file, I don't think we would have issues like #2218 (comment) if we used build package, but I might be forgetting something ... |
|
Well, when I'm running my test cases in a browser, I usually browserify my tests along with Sinon. If the |
|
The way I see it, the pre-bundled Sinon packages are for |
Purpose (TL;DR) - mandatory
It makes bundlers(webpack, rollup) to pick up the es5 version by default when targeting browsers. It solves issues like #1951
How to verify - mandatory
npm install