forked from CodingCatDev/codingcat.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
48 lines (45 loc) · 1.16 KB
/
next.config.js
File metadata and controls
48 lines (45 loc) · 1.16 KB
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
/* eslint @typescript-eslint/no-var-requires: "off" */
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const withPWA = require('next-pwa');
module.exports = withPWA(
withBundleAnalyzer({
reactStrictMode: true,
images: {
domains: ['s3.us-west-2.amazonaws.com'],
loader: 'cloudinary',
path: 'https://media.codingcat.dev/image/upload/',
},
async redirects() {
return [
{
source: '/blog/design-systems-with-web-components',
destination: '/tutorial/design-systems-with-web-components',
permanent: true,
},
{
source: '/lessons/:path*',
destination: '/tutorial/:path*',
permanent: true,
},
{
source: '/blog/:path((?!/).*)',
destination: '/post/:path*',
permanent: true,
},
{
source: '/posts',
destination: '/blog',
permanent: true,
},
];
},
pwa: {
dest: 'public',
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === 'development',
},
})
);