You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When importing stellar-sdk in HTML using the instructions that were previously visible in the README before change #487 took place, errors show in the console. Doing the same with CDNJS hosted version works fine, so something seems to be broken about our deployment on jsDelivr.
What version are you on?
I was attempting to use the latest version with jsDelivr. The same happens when setting the version to 3.3.0 which is the latest version right now.
index.js:2 Uncaught ReferenceError: exports is not defined
at index.js:2
index.html:9 Uncaught ReferenceError: StellarSdk is not defined
at index.html:9
Expected behavior
The stellar-sdk could be included in a HTML page and StellarSdk could be accessed. This is how it works with the CDNJS deployment which works fine:
Additional context
Because this is an issue I opened #487 and removed the jsDelivr example from the README so we aren't recommending that in a highly visible place and causing people to trip up. It would still be great to fix this since jsDelivr is a popular CDN host.
The text was updated successfully, but these errors were encountered:
@leighmcculloch I was just looking into this and the problem is that you are trying to load the node js version. It seems like cdnjs does some kind of transpiling before serving the file.
The good news is that we also include the Browser version as part of the release, you need to reference dist/ instead -- the following works:
Describe the bug
When importing
stellar-sdk
in HTML using the instructions that were previously visible in the README before change #487 took place, errors show in the console. Doing the same with CDNJS hosted version works fine, so something seems to be broken about our deployment on jsDelivr.What version are you on?
I was attempting to use the
latest
version with jsDelivr. The same happens when setting the version to3.3.0
which is the latest version right now.To Reproduce
These are the console errors:
Expected behavior
The stellar-sdk could be included in a HTML page and
StellarSdk
could be accessed. This is how it works with the CDNJS deployment which works fine:Additional context
Because this is an issue I opened #487 and removed the jsDelivr example from the README so we aren't recommending that in a highly visible place and causing people to trip up. It would still be great to fix this since jsDelivr is a popular CDN host.
The text was updated successfully, but these errors were encountered: