todo/src/client/next.config.js

23 lines
468 B
JavaScript
Raw Normal View History

2021-11-15 14:12:18 +01:00
const withPWA = require("next-pwa");
const runtimeCaching = require("next-pwa/cache");
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
module.exports = (phase, { defaultConfig }) => {
2021-11-15 16:54:34 +01:00
if (phase === PHASE_DEVELOPMENT_SERVER) {
return {
reactStrictMode: true,
};
}
2021-11-15 14:12:18 +01:00
return withPWA({
reactStrictMode: true,
pwa: {
2021-11-15 14:25:21 +01:00
dest: "src/public",
2021-11-15 14:23:40 +01:00
register: true,
skipWaiting: true,
2021-11-15 14:12:18 +01:00
runtimeCaching,
},
});
};