contentful.js icon indicating copy to clipboard operation
contentful.js copied to clipboard

Minified build is not exported correctly as ESM

Open Techn1x opened this issue 1 year ago • 0 comments

Expected Behavior

I should be able to import contentful.js into my production build and use the createClient function

Actual Behavior

createClient is not a function when using the minified export

See my comment here for more info https://github.com/contentful/contentful.js/issues/1936#issuecomment-1900027685

Possible Solution

Ensure the minified build is exported as ESM

Steps to Reproduce

Failing test; https://github.com/contentful/contentful.js/pull/2130 and/or import contentful.js >= 10.1.4 & use createClient in a production build

Context

More info here in my comment. https://github.com/contentful/contentful.js/issues/1936#issuecomment-1900027685

Failing test here. https://github.com/contentful/contentful.js/pull/2130

Creating a dedicated issue so this can get some eyes on it. Comment & PR alone didn't seem to get much traction.

Environment

pnpm 8 contentful 10.6.21

Techn1x avatar Feb 19 '24 04:02 Techn1x