-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
39 lines (37 loc) · 1.17 KB
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import withPWA from "next-pwa";
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
// [!code ++] // [!code focus]
serverComponentsExternalPackages: ["grammy"], // [!code ++] // [!code focus]
}, // [!code ++] // [!code focus]
reactStrictMode: true, // Enable React strict mode for improved error handling
swcMinify: true, // Enable SWC minification for improved performance
images: {
// Allow images from the public directory
remotePatterns: [
{
protocol: "https",
hostname: "nditulxhhkdtxjiwimus.supabase.co",
port: "",
pathname: "/storage/v1/object/public/**",
},
{
protocol: "https",
hostname: "lh3.googleusercontent.com",
port: "",
pathname: "/a/**",
},
],
},
typescript: {
ignoreBuildErrors: true,
},
};
export default withPWA({
dest: "public", // destination directory for the PWA files
sw: "sw-pwa.js",
disable: process.env.NODE_ENV === "development", // disable PWA in the development environment
register: true, // register the PWA service worker
skipWaiting: true, // skip waiting for service worker activation
})(nextConfig);