-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.mjs
49 lines (46 loc) · 1.19 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
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: 'standalone',
reactStrictMode: true,
// Optional: Change links `/me` -> `/me/` and emit `/me.html` -> `/me/index.html`
// trailingSlash: true,
// Optional: Prevent automatic `/me` -> `/me/`, instead preserve `href`
// skipTrailingSlashRedirect: true,
// Optional: Change the output directory `out` -> `dist`
// distDir: 'dist',
env: {
commitTag: process.env.COMMIT_TAG || 'local',
},
async redirects() {
return [
{
source: '/watch',
destination: '/watch/web/index.html#!',
permanent: false,
},
{
source: '/watch{/:path((?!web).*)}',
destination: '/watch/web/index.html#!',
permanent: false,
},
{
source: '/watch/web{/:slug((?!index.html).*)}',
destination: '/watch/web/index.html#!',
permanent: false,
},
];
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
issuer: /\.(js|ts)x?$/,
use: ['@svgr/webpack'],
});
return config;
},
experimental: {
scrollRestoration: true,
largePageDataBytes: 256000,
},
};
export default nextConfig;