todo/src/client/next.config.js
2022-08-29 06:49:04 +02:00

24 lines
461 B
JavaScript

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 {
reactStrictMode: true,
};
}
return withPWA({
reactStrictMode: true,
output: 'standalone',
});
};