Skip to content

Commit 0c3e67c

Browse files
authored
Merge pull request #109 from semi-technologies/fix/regeneratorRuntime
Improves babel + rollup config
2 parents 4a09310 + bb90226 commit 0c3e67c

File tree

6 files changed

+31
-117
lines changed

6 files changed

+31
-117
lines changed

.babelrc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
{
22
"presets": ["@babel/preset-env"],
3-
"plugins": ["@babel/plugin-proposal-class-properties"],
4-
"env": {
5-
"test": {
6-
"plugins": [
7-
"@babel/plugin-transform-modules-commonjs",
8-
"@babel/plugin-transform-runtime"
9-
]
10-
}
11-
}
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-transform-runtime"
6+
]
127
}

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
push:
33
branches:
4-
- main
4+
- master
55
tags:
66
- '**'
77
pull_request:

index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import clusterConsts from "./cluster/consts.js";
1616
import replicationConsts from "./data/replication/consts.js";
1717
import { AuthAccessTokenCredentials, AuthUserPasswordCredentials } from "./connection/auth.js";
1818

19-
require('babel-polyfill')
20-
2119
const app = {
2220
client: function (params) {
2321
// check if the URL is set

package-lock.json

Lines changed: 18 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"homepage": "https://github.com/semi-technologies/weaviate-javascript-client#readme",
2323
"dependencies": {
24+
"@babel/runtime": "^7.20.7",
2425
"graphql-request": "^5.1.0",
2526
"isomorphic-fetch": "^3.0.0"
2627
},
@@ -30,7 +31,6 @@
3031
"@babel/plugin-transform-runtime": "^7.11.5",
3132
"@babel/preset-env": "^7.11.5",
3233
"@rollup/plugin-babel": "^5.2.1",
33-
"babel-polyfill": "^6.26.0",
3434
"jest": "^26.4.2",
3535
"prettier": "^2.1.1",
3636
"rollup": "^2.28.2"

rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ export default {
66
file: "lib.js",
77
format: "umd",
88
name: "weaviate-client",
9+
exports: "named",
10+
globals: {
11+
"isomorphic-fetch": "fetch",
12+
"graphql-request": "request",
13+
}
914
},
10-
plugins: [babel({ babelHelpers: "bundled" })],
15+
external: [/@babel\/runtime/, "isomorphic-fetch", "graphql-request"],
16+
plugins: [babel({ babelHelpers: "runtime" })],
1117
};

0 commit comments

Comments
 (0)