mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
Note: there is a bit of potential confusion about the difference between /resources/builder.inc.sh (the full implementation for builder scripts), and /resources/build/builder.inc.sh (the source script that builder scripts should always use). This allows us to make assumptions that will always be true for builder scripts that may not be true for other scripts, such as setting base folder. |
||
|---|---|---|
| .. | ||
| src | ||
| build.sh | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
The default import setup for the tslib package is unfortunately incompatible with esbuild when in ES5 mode. But...
with a little elbow grease, we can fix that with this package by importing its ES5-compatible file and exporting it
as this package's default export for use in anything looking to "importHelpers".
To utilize this with esbuild while enabling the "importHelpers" compilation option in your tsconfig.json, you'll want
to set the following in your esbuild config:
alias: {
'tslib': '@keymanapp/tslib'
},
Note that esbuild 0.15.16 is the minimum required version to utilize the 'alias' feature necessary to replace tslib for
tsc-generated import { /* */ } from 'tslib' statements that result from enabling "importHelpers" in a tsconfig.