fix(ide): polyfill import.meta.url for cjs build (#7279)

This commit is contained in:
Shreya Keshive
2025-08-27 22:12:01 -07:00
committed by GitHub
parent 5f16541c38
commit 4b400f8c7d

View File

@@ -43,6 +43,12 @@ async function main() {
outfile: 'dist/extension.cjs',
external: ['vscode'],
logLevel: 'silent',
banner: {
js: `const import_meta = { url: require('url').pathToFileURL(__filename).href };`,
},
define: {
'import.meta.url': 'import_meta.url',
},
plugins: [
/* add to the end of plugins array */
esbuildProblemMatcherPlugin,