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

fix: provide distinct browser and node ESModule builds for bundlers #382

Closed
wants to merge 3 commits into from

Conversation

ctavan
Copy link
Member

@ctavan ctavan commented Feb 25, 2020

Fixes #378
Closes #380

Currently main field is used for node and module for browser build. This
is not entierly correct. Webpack can be used to build node apps. Though
module is always preferred over main. For browser versions there is a
special field.

In this diff I added esm support for both node and browser.
rollup-plugin-node-resolve look at browser field as well and prefer it
to bundle umd.

https://webpack.js.org/configuration/resolve/#resolvemainfields
https://github.com/rollup/plugins/tree/master/packages/node-resolve#browser
https://github.com/defunctzombie/package-browser-field-spec

TrySound and others added 2 commits February 25, 2020 19:17
Probably will fix #378

Currently main field is used for node and module for browser build. This
is not entierly correct. Webpack can be used to build node apps. Though
module is always preferred over main. For browser versions there is a
special field.

In this diff I added esm support for both node and browser.
rollup-plugin-node-resolve look at browser field as well and prefer it
to bundle umd.

https://webpack.js.org/configuration/resolve/#resolvemainfields
https://github.com/rollup/plugins/tree/master/packages/node-resolve#browser
https://github.com/defunctzombie/package-browser-field-spec
@ctavan ctavan changed the title fix: provide browser versions independent from module system fix: provide distinct browser and Node.js esm builds for module bundlers Feb 25, 2020
@ctavan ctavan changed the title fix: provide distinct browser and Node.js esm builds for module bundlers fix: provide distinct browser and node ESModule builds for module bundlers Feb 25, 2020
@ctavan ctavan changed the title fix: provide distinct browser and node ESModule builds for module bundlers fix: provide distinct browser and node ESModule builds for bundlers Feb 25, 2020
@ctavan ctavan closed this Feb 25, 2020
@ctavan ctavan deleted the trysound-browser-versions branch February 25, 2020 19:59
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

Successfully merging this pull request may close these issues.

Version 7.0.0 not compatible with Azure Functions/AWS Lambda/Google Cloud Functions
2 participants