Skip to content
This repository was archived by the owner on Jul 31, 2022. It is now read-only.

Commit a476623

Browse files
stefanmaricacao
authored andcommitted
fix: use @urql/core instead of urql to not pull react
After #338 the extension fails to load on workspaces without react installed. react is imported by the bundled urql package. Using the @urql/core package instead solves the issue. Closes #345
1 parent 9fd97ac commit a476623

File tree

3 files changed

+44
-112
lines changed

3 files changed

+44
-112
lines changed

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@
208208
},
209209
"scripts": {
210210
"vscode:prepublish": "npm run compile -- --minify",
211-
"compile": "npm run compile:server && esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --external:react --format=cjs --platform=node",
212-
"compile:server": "esbuild ./src/server/server.ts --bundle --outfile=out/server/server.js --external:vscode --external:react --format=cjs --platform=node",
211+
"compile": "npm run compile:server && esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node",
212+
"compile:server": "esbuild ./src/server/server.ts --bundle --outfile=out/server/server.js --external:vscode --format=cjs --platform=node",
213213
"build": "npm run compile -- --sourcemap",
214214
"watch": "npm run build --watch",
215215
"postinstall": "node ./node_modules/vscode/bin/install",
@@ -238,6 +238,7 @@
238238
"@graphql-tools/load": "^7.4.1",
239239
"@graphql-tools/url-loader": "^7.5.2",
240240
"@graphql-tools/wrap": "^8.3.2",
241+
"@urql/core": "^2.3.5",
241242
"babel-polyfill": "6.26.0",
242243
"capitalize": "^2.0.4",
243244
"dotenv": "^10.0.0",
@@ -247,7 +248,6 @@
247248
"graphql-tag": "^2.12.6",
248249
"graphql-ws": "^5.5.5",
249250
"node-fetch": "^2.6.6",
250-
"urql": "^2.0.5",
251251
"vscode-languageclient": "^5.2.1",
252252
"ws": "^8.2.3"
253253
},

src/client/network-helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
createClient,
1414
defaultExchanges,
1515
subscriptionExchange,
16-
} from "urql"
16+
} from "@urql/core"
1717

1818
import {
1919
ExtractedTemplateLiteral,

0 commit comments

Comments
 (0)