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

Please stop using the browser field #7646

Closed
WebReflection opened this issue Jul 3, 2018 · 1 comment
Closed

Please stop using the browser field #7646

WebReflection opened this issue Jul 3, 2018 · 1 comment

Comments

@WebReflection
Copy link

WebReflection commented Jul 3, 2018

Bug report

What is the current behavior?

WebPack uses the package.json browser field, ignoring the main one which is the CommonJS standard field to use.

If the current behavior is a bug, please provide the steps to reproduce.

I've updated one of my projects to be usable as https://unpkg.com/url-search-params right away, since unpkg rightly uses the browser field to serve files to browsers, not to server CJS to bundlers.

What is the expected behavior?

WebPack should use the main CJS field if available, or even module , literally everything but the browser one.

Other relevant information:

People filing bugs at my repo due their usage of WebPack as bundler:
WebReflection/url-search-params#34
WebReflection/url-search-params#35
WebReflection/url-search-params#36

Thanks for fixing this.

@WebReflection
Copy link
Author

right, apparently this is legacy that won't go away. I already have found a work around to this, have a nice day/evening everyone.

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

1 participant