Enable importHelpers TypeScript compiler option

This avoids inlining the TypeScript helpers and instead imports them from tslib, saving bundle size
This commit is contained in:
Rafael Oleza 2020-07-08 17:29:10 +02:00
parent a3f21ac29b
commit 1a9848af7f
No known key found for this signature in database
GPG key ID: 559647D09ED485D1
5 changed files with 27 additions and 0 deletions

View file

@ -55,6 +55,7 @@
"source-map-support": "^0.4.15",
"strip-ansi": "^4.0.0",
"textarea-caret": "^3.0.2",
"tslib": "^2.0.0",
"ua-parser-js": "^0.7.12",
"untildify": "^3.0.2",
"username": "^2.3.0",

View file

@ -1529,6 +1529,11 @@ to-readable-stream@^1.0.0:
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
tslib@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.0.tgz#18d13fc2dce04051e20f074cc8387fd8089ce4f3"
integrity sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"

View file

@ -44,4 +44,23 @@ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQ
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders.`,
},
'tslib@2.0.0': {
repository: 'git+https://github.com/microsoft/tslib',
license: 'BSD',
source:
'https://github.com/microsoft/tslib/blob/74f1ff794985b33657b599b611e82937e3074617/LICENSE.txt',
sourceText: `Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.`,
},
}

View file

@ -3,6 +3,7 @@
"module": "commonjs",
"moduleResolution": "node",
"esModuleInterop": true,
"importHelpers": true,
"target": "es2017",
"allowUnreachableCode": false,
"allowUnusedLabels": false,

View file

@ -4,6 +4,7 @@
"moduleResolution": "node",
"target": "es2017",
"esModuleInterop": true,
"importHelpers": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"noImplicitReturns": true,