Serverless plugin that compiles TypeScript code and bundles dependencies with node-file-trace
This plugin was originally based on serverless-plugin-typescript
and offers the following benefits:
- Significantly smaller packages
- Monorepo support
⚠️ This plugin is still in the early stages of development and some things might not work
- Only AWS is supported
- Individual packaging has not been tested
-
Install the plugin
npm install serverless-plugin-neo
-
Add plugin to Serverless Config file
plugins: - serverless-plugin-neo ... - serverless-offline
If you're using the
serverless-offline
plugin make sure it goes afterserverless-plugin-neo
-
Configure plugin (optional)
custom: serverless-plugin-neo: baseDirectory: '.' tsconfig: 'tsconfig.json'
There are no required settings. You can see a list of all settings and their defaults below.
-
Build your code
serverless package
Name | Type | Default | Description |
---|---|---|---|
baseDirectory | string | process.cwd() |
Your project's root directory. Defaults to process.cwd in a single repo project. Attempts to find the root package.json in a monorepo project. |
excludePackages | string[] | **/aws-sdk/**/* |
A list of packages to exclude from bundling. See the node-file-trace docs for details. |
skipCleanup | boolean | false |
Clean up .build directory after packaging. Disabling this can be useful for troubleshooting build issues. |
tsconfig | string | tsconfig.json |
tsconfig filename |
If you'd like to contribute to this project we recommend that you first open an issue to discuss your proposed change.
- Fork this repo
- Clone the forked repo
- Install dependencies:
npm install
To clean the build directory run npm run clean
- Update the version in
package.json
- Add an entry in
CHANGELOG.md
- Commit your changes
- Run
npm pack --dry-run
to see what will be published - Run
npm publish
- Create a release on GitHub. Use the version as the tag and release name. For example for version
1.0.0
the tag and release name would bev1.0.0
.