I have written an extension for VS Code and now am creating a package for it.
It is recommended then to bundle the files, which I do with esbuild
. Packaging works, but it leaves me with a dilemma. In package.json
, I can either write
"main": "./out/main.js",
which lets VS Code use the bundled code; this results in a usable package but I cannot debug the code.
Or I can write
"main": "./out/extension.js",
which directs VS Code to the original code; then I can debug but I do not generate a usable package.
Surely I must misunderstand something, but what is it?