Skip to content

Commit 76a0a85

Browse files
authored
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
1 parent fe7a354 commit 76a0a85

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/vscode-graphql-execution/esbuild.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ build({
4646
'atpl',
4747
'liquor',
4848
'twig',
49-
'graphql-config',
5049
],
5150
format: 'cjs',
5251
sourcemap: true,
52+
define: { 'import.meta.url': '_importMetaUrl' },
53+
banner: {
54+
js: "const _importMetaUrl=require('url').pathToFileURL(__filename)",
55+
},
5356
})
5457
.then(({ errors, warnings }) => {
5558
if (warnings.length) {

0 commit comments

Comments
 (0)