-
The UMD distribution of supabase.js stopped working recently with the Previously What is the new API for supabase-js? |
Beta Was this translation helpful? Give feedback.
Answered by
richcorbs
Nov 12, 2020
Replies: 2 comments 3 replies
-
Hey @richcorbs, sorry we didn't communicate this, we're now relying on Skypack or jspm to use supabase-js without a bundler. You can do something like this: <!DOCTYPE html>
<html>
<script type="module">
import { createClient } from "https://cdn.skypack.dev/@supabase/supabase-js";
const supabase = createClient(
"https://yourprojectref.supabase.co",
"your.api.key"
);
(async () => {
const { error, data } = await supabase.from("your_table").select();
if (error) {
document.body.innerHTML = `<pre>${JSON.stringify(
error,
null,
2
)}</pre>`;
} else {
document.body.innerHTML = `<pre>${JSON.stringify(data, null, 2)}</pre>`;
}
})();
</script>
</html> |
Beta Was this translation helpful? Give feedback.
3 replies
-
Awesome, thanks! [email protected] solves it for me! |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
richcorbs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome, thanks! [email protected] solves it for me!