-
Notifications
You must be signed in to change notification settings - Fork 13
/
next.config.js
52 lines (49 loc) · 1.25 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
51
52
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
images: {
formats: ["image/avif", "image/webp"],
domains: ["images.ctfassets.net", "i.scdn.co"],
remotePatterns: [
{
protocol: "https",
hostname: "**.digitaloceanspaces.com",
},
{
protocol: "http",
hostname: "books.google.com",
},
{
protocol: "https",
hostname: "assets.literal.club",
},
{
protocol: "https",
hostname: "assets-ol.literal.club",
},
{
protocol: "https",
hostname: "**.spotifycdn.com",
},
],
},
webpack: (config, { webpack }) => {
/* Hide error "Critical dependency: the request of a dependency is an expression" from remark-textr */
config.plugins.push(new webpack.ContextReplacementPlugin(/remark-textr/));
return config;
},
async redirects() {
return [
{
source: "/projects/:path*",
destination: "https://fabe.github.io/projects/:path*",
permanent: false,
},
];
},
};
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
module.exports = withBundleAnalyzer(nextConfig);