Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix VS code extension not loading when building with latest wasm-pack
The latest wasm-pack version creates, by default, a package.json that has a "type": "module" entry in it. We invoke wasm-pack to build the lsp module and store it in the out/ folder. Next we run esbuild to place out/extension.js - the main entry point - into the same directory. That directory now also has the wasm-pack generated package.json, which has the "type": "module", which doesn't match our CJS out/extension.js. When VS code does require("/path/to/extension/out/extension.js"), node.js complains that extension.js is not an ESM because out/package.json claims that it should be. The fix here is to not generate the package.json file we don't need anyway.