With pwa
This commit is contained in:
parent
1eb256f163
commit
9f8e16c036
1
src/client/next-env.d.ts
vendored
1
src/client/next-env.d.ts
vendored
@ -1,5 +1,4 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/types/global" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
|
@ -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',
|
||||
});
|
||||
};
|
||||
|
@ -12,8 +12,8 @@
|
||||
"@reduxjs/toolkit": "^1.6.2",
|
||||
"@tippyjs/react": "^4.2.6",
|
||||
"axios": "^0.24.0",
|
||||
"next": "12.0.3",
|
||||
"next-pwa": "^5.4.0",
|
||||
"next": "^12.2.5",
|
||||
"next-pwa": "^5.6.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"react-redux": "^7.2.6",
|
||||
|
File diff suppressed because one or more lines are too long
1
src/client/public/workbox-40866503.js
Normal file
1
src/client/public/workbox-40866503.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1666
src/client/yarn.lock
1666
src/client/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user