Serverless plugin for zero-config Typescript support
- Zero-config: Works out of the box without the need to install any other compiler or plugins
- Supports ES2015 syntax + features (
export
,import
,async
,await
,Promise
, ...)
yarn add --dev serverless-plugin-typescript
Add the following plugin to your serverless.yml
:
plugins:
- serverless-plugin-typescript
See example folder for a minimal example.
The default tsconfig.json
file used by the plugin looks like this:
{
"preserveConstEnums": true,
"strictNullChecks": true,
"sourceMap": true,
"target": "es5",
"outDir": ".build",
"moduleResolution": "node",
"lib": ["es2015"],
"rootDir": "./"
}
Note 1: The
outDir
option cannot be overwritten.
Note 2: Don't confuse the
tsconfig.json
in this repository with the one mentioned above.
All files from package/include
will be included in the final build file. See Exclude/Include
Join our Slack community if you run into issues or have questions. We love talking to you!