todo/src/client/next.config.js

21 lines
417 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 }) => {
if (phase === PHASE_DEVELOPMENT_SERVER) {
return {
reactStrictMode: true,
};
}
return withPWA({
reactStrictMode: true,
pwa: {
dest: "public",
runtimeCaching,
},
});
};