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

Browser usage via script tag? #2032

Open
TomiTakussaari opened this issue Nov 7, 2023 · 1 comment
Open

Browser usage via script tag? #2032

TomiTakussaari opened this issue Nov 7, 2023 · 1 comment

Comments

@TomiTakussaari
Copy link

Currently readme says about using this library via script tag in browser:

The Contentful Management library will be accessible via the contentfulManagement global variable.

However, it seems to me that after upgrading to webpack5, this has not been true, presumably because webpack output option "library" was removed.

If this usage is no longer supposed to be supported, Readme should probably be updated.

But, personally I like that this approach works, as it makes testing things a bit easier, so it would be cool if this approach could work in future too.

@axe312ger
Copy link
Collaborator

I noticed the same while doing the ESM upgrade and checked the current release with our new test setup.

Actually, current v11 of this library when used with the browser bundles, you the global variable exposed is createClient and not contentfulManagement

This is already resolved in the upcoming next major version with #2472

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

No branches or pull requests

2 participants