This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
73 lines (70 loc) · 1.81 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
/** @type {import('next').NextConfig} */
const withPlugins = require("next-compose-plugins");
const withPWA = require("next-pwa")({
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
});
const withTM = require("next-transpile-modules")([
"react-tag-input",
"react-dnd",
"dnd-core",
"@react-dnd/invariant",
"@react-dnd/asap",
"@react-dnd/shallowequal",
]);
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const { i18n } = require("./next-i18next.config");
const { EnvironmentPlugin } = require('webpack');
module.exports = withPlugins([withTM, withPWA, withBundleAnalyzer], {
i18n,
experimental: {
esmExternals: "loose",
scrollRestoration: true,
nextScriptWorkers: true,
},
reactStrictMode: false,
swcMinify: true,
images: {
domains: [
"xefsjwahbvrgjqysodbm.supabase.co",
"lh3.googleusercontent.com",
"pub-25066e52684e449b90f5170d93e6c396.r2.dev",
"media.discordapp.net",
"imagedelivery.net",
],
},
webpack(config) {
config.plugins.push(
new EnvironmentPlugin(
[
'BASE_URL',
'CLOUDFLARE_IMAGES_ACCOUNT_ID',
'CLOUDFLARE_IMAGES_API_TOKEN',
'CLOUDFLARE_R2_ACCESS_KEY',
'CLOUDFLARE_R2_ACCOUNT_ID',
'CLOUDFLARE_R2_BUCKET_NAME',
'CLOUDFLARE_R2_SECRET_KEY',
'NEXT_PUBLIC_GA_TRACKING_ID',
'NEXT_PUBLIC_MAINTENANCE_MODE',
'NEXT_PUBLIC_SUPABASE_ANON_KEY',
'NEXT_PUBLIC_SUPABASE_URL',
'SUPABASE_SERVICE_ROLE_KEY'
]
)
);
return config;
},
async redirects() {
return [
{
source: "/images/:id*",
destination: "/artworks/:id*",
permanent: false,
},
];
},
});