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

Add "module" to package.json build for ES modules #103

Closed
JohnHardy opened this issue Feb 14, 2020 · 1 comment
Closed

Add "module" to package.json build for ES modules #103

JohnHardy opened this issue Feb 14, 2020 · 1 comment
Assignees
Labels

Comments

@JohnHardy
Copy link

@JohnHardy JohnHardy commented Feb 14, 2020

Please would it be possible to add a module field in the package.json for an ES2019 bundle?

https://github.com/rollup/rollup/wiki/pkg.module

At the moment it seems like only browser and main are supported, targeting UMD and CommonJS respectively?

At the moment we are using rollup and the line that causes the trouble in bundling (using the commonJs() rollup plugin) is this one:

process.env.TEXT_ENCODING !== "never" && typeof TextEncoder !== "undefined" && typeof TextDecoder !== "undefined";

@gfx gfx added the Feature label Feb 16, 2020
@gfx
Copy link
Member

@gfx gfx commented Feb 16, 2020

Thanks for the feature request. Sounds a good idea, so I'll do in the next few releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.