With pwa
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
const withPWA = require("next-pwa");
|
||||
const runtimeCaching = require("next-pwa/cache");
|
||||
|
||||
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
|
||||
|
||||
const withPWA = require("next-pwa")({
|
||||
dest: "public",
|
||||
register: true,
|
||||
skipWaiting: true,
|
||||
runtimeCaching,
|
||||
})
|
||||
|
||||
module.exports = (phase, { defaultConfig }) => {
|
||||
if (phase === PHASE_DEVELOPMENT_SERVER) {
|
||||
return {
|
||||
@@ -12,11 +18,6 @@ module.exports = (phase, { defaultConfig }) => {
|
||||
|
||||
return withPWA({
|
||||
reactStrictMode: true,
|
||||
pwa: {
|
||||
dest: "public",
|
||||
register: true,
|
||||
skipWaiting: true,
|
||||
runtimeCaching,
|
||||
},
|
||||
output: 'standalone',
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user