-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
45 lines (39 loc) · 1.23 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
const path = require("path");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer({
reactStrictMode: true,
i18n: {
locales: ["en"],
defaultLocale: "en",
},
images: {
minimumCacheTTL: 60 * 60 * 24 * 7, // In seconds, one week
domains: ["via.placeholder.com", "nddyfchsgrewkdbjnwcz.supabase.in"],
remotePatterns: [
{ protocol: "https", hostname: "**.googleusercontent.com" },
{ protocol: "https", hostname: "**.wp.com" },
{ protocol: "https", hostname: "**.stadiahoy.com" },
],
},
webpack(config) {
// Add SVGR:
// https://react-svgr.com/docs/next/
// Check what's different with the files under the icons folder:
// https://react-svgr.com/docs/options/#icon
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
include: [path.resolve(__dirname, "public/images/icons")],
use: [{ loader: "@svgr/webpack", options: { icon: true } }],
});
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
exclude: [path.resolve(__dirname, "public/images/icons")],
use: ["@svgr/webpack"],
});
return config;
},
});