add pwa config

This commit is contained in:
2026-04-15 11:50:15 +03:30
parent d163d2c23f
commit fee71ef99f
11 changed files with 146 additions and 3 deletions

25
next.config.ts Normal file
View File

@@ -0,0 +1,25 @@
// next.config.ts
import type { NextConfig } from "next";
import createNextIntlPlugin from "next-intl/plugin";
// @ts-ignore no types for next-pwa
const withPWA = require("next-pwa")({
dest: "public",
disable: process.env.NODE_ENV === "development",
register: true,
skipWaiting: true,
navigateFallback: "/offline.html", // fallback page
});
const withNextIntl = createNextIntlPlugin();
const nextConfig: NextConfig = {
// output : "standalone",
images: {
remotePatterns: [],
},
};
const configWithIntl = withNextIntl(nextConfig);
export default withPWA(configWithIntl);