Skip to content

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

@JohnHardy

Description

@JohnHardy

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";

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions