Send web-push using Node.js modules

28 views Asked by At

I'm following this well documented page about sending a web-push: https://github.com/web-push-libs/web-push

But I'm using node.js in AWS Lambda in the new format, so it will be:

import ??? from "web-push";

How do I import the sendNotification function from web-push?

PS, using import { sendNotification } from "web-push";

results in:

Named export 'sendNotification' not found. The requested module 'web-push' is a CommonJS module, which may not support all module.exports as named exports.
0

There are 0 answers