Define global in web extension build (fixes #1523)

This commit is contained in:
Riccardo Ferretti
2025-10-01 15:58:35 +02:00
parent dcb951004a
commit fb92790a0a

View File

@@ -25,6 +25,9 @@ const config = {
platform: 'browser',
format: 'cjs',
outfile: `out/bundles/extension-web.js`,
define: {
global: 'globalThis',
},
plugins: [
polyfillPlugin.polyfillNode({
// Options (optional)
@@ -64,7 +67,7 @@ async function main() {
...config[platform],
entryPoints: ['src/extension.ts'],
bundle: true,
minify: production,
minify: false, //production,
sourcemap: !production,
sourcesContent: false,
external: ['vscode'],