0.0.8 • Published 2 years ago

serverless-tscpaths v0.0.8

Weekly downloads
262
License
MIT
Repository
github
Last release
2 years ago

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