Skip to content

Commit

Permalink
Update esbuild config in getting started guide (#450)
Browse files Browse the repository at this point in the history
Description of changes

When following the getting started guide, I got stuck because esbuild seems to prefer the UMD exports of some transpiled modules. Those can not be statically analyzed and cause runtime errors for missing dependencies - in my case `vscode-json-languageservice` and some of its dependencies.

By telling esbuild to prefer the module field over main, this issue gets avoided.
  • Loading branch information
AlCalzone committed Mar 21, 2023
1 parent 533de64 commit b4f21bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/getting-started.md
Expand Up @@ -61,6 +61,7 @@ const baseConfig = {
const extensionConfig = {
...baseConfig,
platform: "node",
mainFields: ["module", "main"],
format: "cjs",
entryPoints: ["./src/extension.ts"],
outfile: "./out/extension.js",
Expand Down

0 comments on commit b4f21bc

Please sign in to comment.