forked from javayhu/free-directory-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.docker.js
44 lines (41 loc) · 1.33 KB
/
next.config.docker.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
const { withContentlayer } = require("next-contentlayer2");
import("./env.mjs");
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "standalone",
// distDir: 'out',
reactStrictMode: true,
swcMinify: true,
images: {
// https://medium.com/@niniroula/nextjs-upgrade-next-image-and-dangerouslyallowsvg-c934060d79f8
// The requested resource "https://cdn.sanity.io/images/58a2mkbj/preview/xxx.svg?fit=max&auto=format" has type "image/svg+xml"
// but dangerouslyAllowSVG is disabled
dangerouslyAllowSVG: true,
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "lh3.googleusercontent.com",
},
{
protocol: "https",
hostname: "randomuser.me",
},
{
protocol: "https",
hostname: "cdn.sanity.io", // https://www.sanity.io/learn/course/day-one-with-sanity-studio/bringing-content-to-a-next-js-front-end
},
{
protocol: "https",
hostname: "via.placeholder.com", // https://www.sanity.io/learn/course/day-one-with-sanity-studio/bringing-content-to-a-next-js-front-end
},
],
},
experimental: {
serverComponentsExternalPackages: ["@prisma/client"],
},
};
module.exports = withContentlayer(nextConfig);