Skip to content

Commit 32d4741

Browse files
committed
fix: makes package work in nodejs environments too
1 parent 4684a18 commit 32d4741

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

.babelrc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
{
2-
"presets": [["@babel/preset-env"], ["minify", { "removeUndefined": false }]]
3-
}
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"esmodules": true
8+
}
9+
}
10+
],
11+
["minify", { "removeUndefined": false }]
12+
],
13+
"plugins": ["@babel/plugin-transform-runtime"]
14+
}

package-lock.json

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@supabase/supabase-js",
3-
"version": "0.34.1",
3+
"version": "0.34.4",
44
"description": "Supabase Realtime API",
55
"main": "./lib/index.js",
66
"scripts": {
@@ -38,6 +38,7 @@
3838
"devDependencies": {
3939
"@babel/cli": "^7.8.3",
4040
"@babel/core": "^7.8.3",
41+
"@babel/plugin-transform-runtime": "^7.10.5",
4142
"@babel/preset-env": "^7.8.3",
4243
"@babel/register": "^7.8.3",
4344
"babel-plugin-add-module-exports": "^1.0.0",

src/Auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const superagent = require('superagent')
1+
import superagent from 'superagent'
22

33
class Auth {
44
constructor(authUrl, supabaseKey, options = { autoRefreshToken: true }) {

0 commit comments

Comments
 (0)