Skip to content

Commit

Permalink
fix vscode-graphql-execution esbuild.js (#3480)
Browse files Browse the repository at this point in the history
* Update esbuild.js

A possibly naive way to make vscode extension work after esbuild upgrade.

* Update esbuild.js

Turns out I was quite naive about just excluding graphql-config.  The extension worked under the Test Runner, but not when bundled and installed.

This change actually does work, even when the plugin is bundled and installed separately.  It uses the technique outlined in evanw/esbuild#2441

* add changeset

---------

Co-authored-by: Rikki Schulte <[email protected]>
  • Loading branch information
craig-riecke and acao committed Jan 6, 2024
1 parent a808019 commit a1fced1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/smooth-clocks-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"vscode-graphql-execution": patch
"vscode-graphql": patch
---

Fix execution extension esbuild bundling
4 changes: 4 additions & 0 deletions packages/vscode-graphql-execution/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ build({
],
format: 'cjs',
sourcemap: true,
define: { 'import.meta.url': '_importMetaUrl' },
banner: {
js: "const _importMetaUrl=require('url').pathToFileURL(__filename)",
},
})
.then(({ errors, warnings }) => {
if (warnings.length) {
Expand Down

0 comments on commit a1fced1

Please sign in to comment.