todo/src/client/next.config.js

21 lines
421 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: {
2021-11-15 14:14:45 +01:00
dest: "src/public",
2021-11-15 14:12:18 +01:00
runtimeCaching,
},
});
};