Skip to content

[intl-messageformat] Support of ES modules #1913

@goremikin

Description

@goremikin

Which package?
intl-messageformat

Describe the bug
In intl-messageformat@9.2.0 intl-format-cache has been replaced with fast-memoize (see mr: 1a7eb02). Unfortunately fast-memoize supports only UMD.

This has introduced an issue for applications that rely on ES6 module syntax (ESM). Because of that the entire application needs to be bundled by Webpack or similar.

To Reproduce
Run the code natively without any transformations or bundling (e.g. es-dev-server can bee used). A WebBrowser will throw:

ReferenceError: module is not defined at node_modules/fast-memoize/src/index.js:140:1

Expected behavior
intl-messageformat is targeted both: Web Browser and node.js. I expect both to work without bundler.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions