Open hmz22 opened 4 years ago
i solved this. my next.config.js:
const path = require("path");
const nextOffline = require("next-offline");
module.exports = nextOffline({
workboxOpts: {
importScripts: ["./sw.js"],
mode: "production",
swDest: path.join(__dirname, "public/service-worker.js")
}
});
and i create sw.js in public folder
Hi dears. How can append separate file service worker with push notification code in workboxOpt, next.config.js when build. please please.