workaround: for some reason "target" seems to be ignored in tsconfig

Massimo Melina committed Jan 2, 2022 at 13:41 UTC faff02fd376cc388f5f333385d47454fbe653612
2 files changed +3 -3
package.json
+1 -1
@@ -13,7 +13,7 @@
13 "watch-server": "nodemon --ignore tests/ --watch src -e ts,tsx --exec ts-node src/index.ts",
14 "start-frontend": "cd frontend && npm run start",
15 "start": "node dist",
16 - "build": "npm install && node timestamp && tsc && cp package*.json *.yaml dist && cd dist && npm ci --production",
16 + "build": "npm install && node timestamp && tsc --target es2018 && cp package*.json *.yaml dist && cd dist && npm ci --production",
17 "build-all": "npm run build && cd frontend && npm install && npm run build && cd ..",
18 "test": "mocha -r ts-node/register 'tests/**/*.ts'",
19 "make-exe-after-build": "pkg . -C brotli"
tsconfig.json
+2 -2
@@ -12,8 +12,8 @@
12 // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
13
14 /* Language and Environment */
15 - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
16 - "lib": ["es5","es2016"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
15 + "target": "es2018", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
16 + "lib": ["es5","es2018"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
17 // "jsx": "preserve", /* Specify what JSX code is generated. */
18 // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
19 // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */