Skip to content

support ESM #772

Open
Open
@its-dibo

Description

@its-dibo

I want to use web-push server functions i.e. generateVAPIDKeys and sendNotification, but it seems that web-push doesn't support esm packages, i.e packages that define type: module on its package.json

SyntaxError: Named export 'generateVAPIDKeys' not found. The requested module 'web-push' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

when using the default export the same error occurs because the file is compiled into ESM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions