web-push icon indicating copy to clipboard operation
web-push copied to clipboard

support ESM

Open its-dibo opened this issue 2 years ago • 8 comments
trafficstars

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

its-dibo avatar Feb 08 '23 16:02 its-dibo