forked from eduardconstantin/azure-cloud-exams
-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathnext.config.js
More file actions
29 lines (27 loc) · 799 Bytes
/
next.config.js
File metadata and controls
29 lines (27 loc) · 799 Bytes
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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
turbopack: {},
webpack: (config) => {
if (!config.experiments) {
config.experiments = {};
}
config.experiments.topLevelAwait = true;
return config;
},
images: {
remotePatterns: [
{ protocol: "http", hostname: "localhost", pathname: "/**" },
{ protocol: "https", hostname: "localhost", pathname: "/**" },
],
},
};
// Only enable PWA in production to avoid dev server issues
const withPWA = require("next-pwa")({
dest: "public",
disable: process.env.NODE_ENV === "development",
register: false, // Disable service worker registration
skipWaiting: false,
});
module.exports =
process.env.NODE_ENV === "development" ? nextConfig : withPWA(nextConfig);