10062: Set esbuild target as node14 r=matklad a=mtsmfm

ref: https://github.com/rust-analyzer/rust-analyzer/pull/10061

Currently, target version is not specified so it's esnext.

https://esbuild.github.io/api/#target

VSCode uses node 14 since version 1.56.

https://github.com/rust-analyzer/rust-analyzer/issues/3167#issuecomment-907058367

Co-authored-by: Fumiaki MATSUSHIMA <mtsmfm@gmail.com>
This commit is contained in:
bors[bot] 2021-08-28 14:48:46 +00:00 committed by GitHub
commit 2e3322d3f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,7 @@
"scripts": {
"vscode:prepublish": "npm run build-base -- --minify",
"package": "vsce package -o rust-analyzer.vsix",
"build-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node",
"build-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node --target=node14",
"build": "npm run build-base -- --sourcemap",
"watch": "npm run build-base -- --sourcemap --watch",
"lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",