forked from portapack-mayhem/MayhemHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
24 lines (21 loc) · 899 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
basePath: process.env.NEXT_PUBLIC_BASE_PATH ?? "",
reactStrictMode: false,
swcMinify: true, // Enable SWC minification for improved performance
compiler: {
removeConsole: process.env.NODE_ENV !== "development", // Remove console.log in production
},
env: {
BUILD_ID: new Date().toISOString(), // Later it would be worth setting up the git's commit hash as the build id
},
};
// Configuration object tells the next-pwa plugin
const withPWA = require("@ducanh2912/next-pwa").default({
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
});
module.exports = withPWA(nextConfig);