Skip to content

feat: add aws-node-esm-esbuild example#816

Open
czubocha wants to merge 2 commits into
v4from
feat/aws-node-esm-esbuild
Open

feat: add aws-node-esm-esbuild example#816
czubocha wants to merge 2 commits into
v4from
feat/aws-node-esm-esbuild

Conversation

@czubocha

Copy link
Copy Markdown
Contributor

Summary

  • Add aws-node-esm-esbuild: a minimal TypeScript service bundled as an ES module (.mjs) via the built-in esbuild support (format: esm + outExtension), with no package.json inside the deployment artifact
  • The handler demonstrates ESM loading by reading import.meta.url and returning it in the HTTP response
  • examples.json entry added and README index regenerated (npm run validate and npm run docs both pass)

Test plan

  • Deployed to AWS, exercised the HTTP endpoint (responds with "loaded as an ES module"), ran serverless invoke local, and removed the stack

Note

This example uses the outExtension support added in serverless/serverless#13740, so it should be merged once that change is available in a release.

Demonstrates bundling TypeScript handlers as ES modules (.mjs) via esbuild format + outExtension, without shipping a package.json in the artifact. Verified deployable (deploy, HTTP endpoint, invoke local, remove).
@czubocha
czubocha force-pushed the feat/aws-node-esm-esbuild branch from de0a09d to 3ce26d6 Compare July 23, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant