-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.cjs
37 lines (35 loc) · 926 Bytes
/
next.config.cjs
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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
webpack(config) {
config.experiments = { ...config.experiments, topLevelAwait: true }
return config
},
// From the SVGR Docs: https://react-svgr.com/docs/next/
webpack(config) {
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.(".svg"))
config.module.rules.push(
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/, // *.svg?url
},
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: /url/ },
use: ["@svgr/webpack"],
}
)
fileLoaderRule.exclude = /\.svg$/i
return config
},
// If you have a paid Vercel plan, you can enable the following:
// functions: {
// "api/**/*.ts": {
// maxDuration: 60,
// },
// },
}
module.exports = nextConfig