todo/src/client/next.config.js

24 lines
461 B
JavaScript
Raw Normal View History

2021-11-15 14:12:18 +01:00
const runtimeCaching = require("next-pwa/cache");
const { PHASE_DEVELOPMENT_SERVER } = require("next/constants");
2022-08-29 06:49:04 +02:00
const withPWA = require("next-pwa")({
dest: "public",
register: true,
skipWaiting: true,
runtimeCaching,
})
2021-11-15 14:12:18 +01:00
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,
2022-08-29 06:49:04 +02:00
output: 'standalone',
2021-11-15 14:12:18 +01:00
});
};