Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

serverless-tscpaths

baemingo29.2kMIT0.0.8TypeScript support: included

Replace absolute paths to relative paths after typescript compilation

serverless, serverless framework, serverless plugin, typescript, paths, alias, absolute path, relative path, compilation, tsc

readme

serverless-tscpaths

npm version Dependency Status License

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 # should be after serverless-plugin-typescript

Configuration

You can specify paths to your build or tsconfig using custom section of your serverless.yml.

custom:
  tscpaths:
    buildPath: dist # default is .build
    tsconfigPath: tsconfig.es5.json # default is tsconfig.json in the root folder
    tscpathsPath: node_modules/@baemingo/tscpaths-async # if you want to use different lib