@next-with-offline/service-worker
Code utilities for configuring a service worker. Intended to be used alongside @next-with-offline/next-plugin and @next-with-offline/react-hook. Read the top level documentation for more information about usage.
Install
yarn add @next-with-offline/service-worker
Basic Usage
import hasOffline from "@next-with-offline/service-worker";
hasOffline({
cleanupOutdatedCaches: true,
offlineGoogleAnalytics: false,
offlinePath: "/offline",
showReloadPrompt: false,
});