-
Notifications
You must be signed in to change notification settings - Fork 8
/
next.config.js
45 lines (41 loc) · 1.02 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/** @type {import('next').NextConfig} */
const securityHeaders = require("./headers");
const withPWA = require("next-pwa")({
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
mode: "production",
});
const nextConfig = {
reactStrictMode: true,
productionBrowserSourceMaps: true,
experimental: {
scrollRestoration: true,
},
swcMinify: false,
compiler: {
removeConsole: process.env.NODE_ENV !== "development",
},
images: {
formats: ["image/avif", "image/webp"],
domains: ["localhost", "api.devcommunity.io", "admin.devcommunity.io", "api-test.devcommunity.io", "api.updevcommunity.com", "admin.updevcommunity.com", "api-test.updevcommunity.com"],
minimumCacheTTL: 60,
},
i18n: {
locales: ["en", "fr"],
defaultLocale: "fr",
localeDetection: true,
},
async headers() {
return [
{
source: "/:path*",
headers: securityHeaders,
},
];
},
};
module.exports = withPWA({
...nextConfig,
});