-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathnext.config.mjs
51 lines (44 loc) · 1.17 KB
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
import million from "million/compiler"
import "./env.mjs"
import withNextIntl from "next-intl/plugin"
const i18nConfig = "./src/i18n/i18n.ts"
const millionConfig = {
auto: { rsc: true },
}
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
...(process.env.NODE_ENV === "production" && {
compiler: {
removeConsole: {
exclude: ["error"],
},
},
}),
experimental: {
// Enabling Skew protection
useDeploymentId: true,
useDeploymentIdServerActions: true,
// End Enabling Skew protection
serverMinification: true,
forceSwcTransforms: true,
optimisticClientCache: true,
workerThreads: true,
optimizeServerReact: true,
},
images: {
domains: [
"images.clerk.com",
"www.gravatar.com",
"googleusercontent.com",
"pbxt.replicate.delivery",
"oaidalleapiprodscus.blob.core.windows.net",
"cdn.openai.com",
],
},
transpilePackages: ["react-tweet"],
}
const combinedMillionConfig = million.next(nextConfig, millionConfig)
const combinedIntlConfig = withNextIntl(i18nConfig)(combinedMillionConfig)
export default combinedIntlConfig