add pwa config
This commit is contained in:
25
next.config.ts
Normal file
25
next.config.ts
Normal 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);
|
||||
Reference in New Issue
Block a user