I’m trying to use the web sdk in my javascript code but I can’t even pass the initial stage. I’m loading the sdk from unpkg. Here’s my code:
<script src="https://unpkg.com/@revenuecat/purchases-js@0.11.1/dist/Purchases.umd.js"></script>
<script>
const api_key = “PUBLIC_API_KEY”
const appUserId = “MY_APP_USER_ID” // Replacing with my own userid
const purchases = Purchases.configure(api_key, appUserId);
</script>
And just this gives me the error:
Purchases.configure is not a function
What am I doing wrong here?