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

UMD version is used when bundled with Webpack #42

Open
jgonera opened this issue Apr 8, 2020 · 1 comment
Open

UMD version is used when bundled with Webpack #42

jgonera opened this issue Apr 8, 2020 · 1 comment
Assignees

Comments

@jgonera
Copy link

jgonera commented Apr 8, 2020

I'm building an app that targets only new browsers but when I import JSBI from 'jsbi' Webpack uses the UMD bundle because the browser field from package.json takes precedence over module field. My understanding was that the browser field was used only for packages that implement browser-specific code (using browser APIs). Is there a reason why an UMD build is needed these days given how widely used code bundlers are?

This is not a big deal now since the UMD version is only slightly bigger but will become more relevant if #22 gets resolved (UMD build won't work with tree-shaking).

@mathiasbynens mathiasbynens self-assigned this Apr 9, 2020
@jgonera
Copy link
Author

jgonera commented Apr 18, 2020

Tangential to this (but also not relevant until this is resolved), it would be great if non-UMD versions were not minified. I'm trying to debug something right now and all I see in the profiler are single-letter function names. I know I can just copy the JSBI source over to my project but it's slightly less convenient :)

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