-
Notifications
You must be signed in to change notification settings - Fork 18
/
next.config.js
41 lines (37 loc) · 989 Bytes
/
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
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
appDir: true,
// TODO https://beta.nextjs.org/docs/configuring/typescript#statically-typed-links
// typedRoutes: true,
},
trailingSlash: true,
transpilePackages: ["react-syntax-highlighter"],
images: {
domains: [
"prompt-engineering.github.io",
"chatvisualnovelassets.s3.us-west-2.amazonaws.com",
"assets.chatvisualnovel.com",
],
},
webpack: (config, options) => {
config.module.rules.push({
test: /\.yml/,
use: "yaml-loader",
});
config.module.rules.push({
test: /\.svg$/i,
type: "asset",
resourceQuery: /url/, // *.svg?url
});
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: [/url/] }, // exclude react component if *.svg?url
use: ["@svgr/webpack"],
});
return config;
},
};
module.exports = nextConfig;