Package Exports
- serverless-package-external
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-package-external) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-package-external 📦
Deploy a Serverless Python Function services with external code
Before deploying, this plugin symlinks folders containing shared code into the root directory of your Serverless function.
This plugin works also with serverless-offline plugin.
Installation
npm i serverless-package-external --save-devUsage
service: service-name
plugins:
- serverless-package-external
functions:
# Your functions here
custom:
packageExternal:
external:
- '../common'
- '../service-a/module'Example Directory Structure
└── common
└── resource.py
└── service-a
└── handler.py
└── serverless.yml
└── module
└── main.py
└── service-b
└── handler.py
└── serverless.ymlIn handler.py, external code can be imported:
from common.resource import shared_resourceLicensing
serverless-package-external is licensed under the MIT License.
It is originally based on serverless-package-common.