When using serverless-offline-sns with the current Serverless Framework v4 (≥ 4.0.0), the plugin crashes during startup
Plugin is not aware of the framework’s native esbuild lifecycle.
If we dont apply a manual “esbuild workaround”, Lambda code isn’t bundled at all, so the service boots with empty handler files and fails immediately.
Error: Cannot find module 'src/handler.js' # Lambda file never built
Current “must-have” hack
// serverless.ts
build: { esbuild: false } # ⬅ disable v4 native builder
plugins: ["serverless-esbuild"] # ⬅ old plugin as a replacement
Could you please add v4-compatible build handling (or at least document the requirement)?
Right now without the hack Lambda files never compile, leading to a fatal “handler not found” error during sls offline startup.