From 82ad6afd364942f5313e21618c2d05e824fbcce5 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 3 May 2022 01:33:51 +0900 Subject: [PATCH] Fixes microsoft/vscode#147936 (#148503) By changing output esbuild setting for Markdown preview scripts to iife, prevents global namespace pollution and reduces possibility of breaking the preview by contributions from other extensions. --- extensions/markdown-language-features/esbuild-preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown-language-features/esbuild-preview.js b/extensions/markdown-language-features/esbuild-preview.js index d6af78d016e..c25dab4dbae 100644 --- a/extensions/markdown-language-features/esbuild-preview.js +++ b/extensions/markdown-language-features/esbuild-preview.js @@ -28,7 +28,7 @@ function build() { bundle: true, minify: true, sourcemap: false, - format: 'esm', + format: 'iife', outdir: outDir, platform: 'browser', target: ['es2020'],