Skip to content

Feature request: build as esmodule #521

Closed
@flochaz

Description

@flochaz

Description of the feature request

Problem statement
Powertools is packaged as commonJS which does not give the capability to javascript developers to use esmodule import syntax and feature.

Summary of the feature
Now that AWS Lambda support es module import it might worth generating esmodule.

Code examples

Before:

const { Tracer } = require('@aws-lambda-powertools/tracer');

After:

import { Tracer } from '@aws-lambda-powertools/tracer';

Benefits for you and the wider AWS community
See https://aws.amazon.com/blogs/compute/using-node-js-es-modules-and-top-level-await-in-aws-lambda/ for more details ...

Additional context
slack channel discussion

Related issues, RFCs

#490

Metadata

Metadata

Labels

completedThis item is complete and has been merged/shippedfeature-requestThis item refers to a feature request for an existing or new utilityloggerThis item relates to the Logger UtilitymetricsThis item relates to the Metrics UtilitytracerThis item relates to the Tracer Utility

Type

No type

Projects

Status

Shipped

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions