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

Add back UMD to npm builds #72

Merged
merged 2 commits into from
Nov 12, 2020
Merged

Add back UMD to npm builds #72

merged 2 commits into from
Nov 12, 2020

Conversation

soedirgo
Copy link
Member

@soedirgo soedirgo commented Nov 11, 2020

What kind of change does this PR introduce?

Patch update.

What is the current behavior?

When doing the TypeScript transition, we were assuming <script type="module"> is enough, but it seems being able to use it outside of module <script>s is still convenient, so we're adding it back (just for supabase-js).

What is the new behavior?

You can now use plain <script>s to import supabase-js from CDNs, like <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js"></script> or <script src="https://unpkg.com/@supabase/supabase-js"></script> as before.

Then you can use it from a global supabase variable:

<script>
const { createClient } = supabase
supabase = createClient("url", "key")
...
</script>

Additional context

Fixes #278.

@kiwicopple
Copy link
Member

Nice one Bobby 🙏

Fixes supabase/supabase#285

@kiwicopple
Copy link
Member

🎉 This PR is included in version 1.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kiwicopple kiwicopple mentioned this pull request Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants