-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
50 lines (40 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
46
47
48
49
50
const { i18n } = require("./next-i18next.config")
const runtimeCaching = require("next-pwa/cache")
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
logging: {
fetches: {
fullUrl: true
}
},
images: {
formats: ["image/avif", "image/webp"],
remotePatterns: [
{
protocol: "https",
hostname: process.env.NEXT_IMAGE_DOMAIN,
pathname: "/sites/default/files/**"
}
]
},
i18n,
compiler: {
removeConsole: process.env.NODE_ENV !== "development"
}
// output: "standalone"
}
const withPWA = require("next-pwa")({
dest: "public",
disable: process.env.NODE_ENV === "development",
register: true,
sw: "/sw.js",
runtimeCaching
})
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
openAnalyzer: true
})
// Compose all the plugins one by one.
const plugins = [withPWA, withBundleAnalyzer]
module.exports = plugins.reduce((config, plugin) => plugin(config), nextConfig)