-
-
Notifications
You must be signed in to change notification settings - Fork 802
Open
Description
Bug Report
Offline is not using neither the provided esbuild config file nor ts-node. The function works fine when deploying to aws with sls deploy or locally with sls dev. My project is based on NestJs, that means decorators et class metadata should be enabled in build configuration. When I run my code with ts-node, it works fine too. But the offline seems change the configuration and never add emission of metadata.
Sample Code
- file: serverless.yml
service: my-service
plugins:
- serverless-offline
build:
esbuild:
configFile: ./bundlers/esbuild/esbuild.config.mjs
provider:
runtime: nodejs20.x
stage: dev
functions:
hello:
events:
- http:
method: get
path: hello
handler: handler.helloNote
- The esbuild configuration file extension is
mjs serverless-offlineis the only used plugin
Environment
serverlessversion: v4.4.7serverless-offlineversion: v14.3.3node.jsversion: v20OS: macOS 15.0.1
Additional context/Screenshots
- The project is in typescript
- No file is output after the build using
serverless-offline
Workaround
- use
sls devinstead ofsls offline
francoislg and bujxke
Metadata
Metadata
Assignees
Labels
No labels