-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
108 lines (100 loc) · 2.29 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/** @type {import('next').NextConfig} */
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const nextConfig = {
output: "standalone",
transpilePackages: [
"@hookform/resolvers",
"@reduxjs/toolkit",
"@svgr/webpack",
"@tiptap/extension-color",
"@tiptap/extension-text-style",
"@tiptap/extension-underline",
"@tiptap/html",
"@tiptap/pm",
"@tiptap/react",
"@tiptap/starter-kit",
"@tiptap/core",
"zeed-dom",
"embla-carousel-autoplay",
"embla-carousel-react",
"next",
"next-auth",
"normalize.css",
"overlayscrollbars-react",
"qs",
"react",
"react-dom",
"react-hook-form",
"react-imask",
"react-paginate",
"react-redux",
"sharp",
"sonner",
"use-immer",
"immer",
"zod",
],
images: {
minimumCacheTTL: 31540000000,
remotePatterns: [
{
protocol: "https",
hostname: "s3-alpha-sig.figma.com",
port: "",
pathname: "/img/**",
},
{
protocol: "https",
hostname: "i.postimg.cc",
port: "",
pathname: "/**",
},
{
protocol: "https",
hostname: "finsweet.ru",
port: "",
pathname: "/backend-api/images/**",
},
{
protocol: "http",
hostname: "localhost",
port: "3001",
pathname: "/backend-api/images/**",
},
{
protocol: "http",
hostname: "localhost",
port: "3001",
pathname: "/api/images/**",
},
{
protocol: "http",
hostname: "192.168.240.3",
port: "3001",
pathname: "/api/images/**",
},
],
},
webpack(config) {
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.(".svg"));
config.module.rules.push(
{
...fileLoaderRule,
test: /\.svg$/i,
resourceQuery: /url/,
},
{
test: /\.svg$/i,
issuer: fileLoaderRule.issuer,
resourceQuery: { not: [...fileLoaderRule.resourceQuery.not, /url/] },
use: ["@svgr/webpack"],
},
);
fileLoaderRule.exclude = /\.svg$/i;
return config;
},
};
module.exports = withBundleAnalyzer(nextConfig);
// config.plugins.push(new MiniCssExtractPlugin());