Skip to content

Export CJS and ESM Lib #127

@ClementCornut

Description

@ClementCornut

Feature Request

Is your feature request related to a problem? Please describe.

I have a serverless setup with type: "module" and no bundler like vite, webpack etc (I use serverless-jetpack to upload only necessary files). With the actual output config of vite the lib is cjs only and cannot be imported like said in the doc under my configuration.
Because of that I have no choice but to import with default export
For example
import awsPkg from "@h4ad/serverless-adapter/lib/adapters/aws/index.js";
It's not very convenient.

Describe the solution you'd like
It would be great if the lib was exported as both cjs and esm with appropriate resolution in package.json. It shoudn't impact cjs users and benefit to esm users

Are you willing to resolve this issue by submitting a Pull Request?

I can try to do it but I prefer to wait some comments on this request if I missed something

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions