-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
19 lines (17 loc) · 792 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Configuration options for Next.js
const nextConfig = {
reactStrictMode: true, // Enable React strict mode for improved error handling
swcMinify: true, // Enable SWC minification for improved performance
compiler: {
removeConsole: process.env.NODE_ENV !== "development", // Remove console.log in production
},
};
// Configuration object tells the next-pwa plugin
const withPWA = require("next-pwa")({
dest: "public", // Destination directory for the PWA files
disable: process.env.NODE_ENV === "development", // Disable PWA in development mode
register: true, // Register the PWA service worker
skipWaiting: true, // Skip waiting for service worker activation
});
// Export the combined configuration for Next.js with PWA support
module.exports = withPWA(nextConfig);