serverless-tscpaths
Replace absolute paths to relative paths after typescript compilation for serverless
Installation
First, add serverless-tscpaths to your project:
$ yarn add serverless-tscpaths -D
Then inside your project's serverless.yml
file add following entry to the plugins section: serverless-tscpaths
. If there is no plugin section you will need to add it to the file.
It should look something like this:
plugins:
- serverless-plugin-typescript
- serverless-tscpaths
Configuration
You can specify paths to your build or tsconfig using custom
section of your serverless.yml
.
custom:
tscpaths:
buildPath: dist
tsconfigPath: tsconfig.es5.json
tscpathsPath: node_modules/@baemingo/tscpaths-async