forked from carlson-technologies/coffeeclass.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
136 lines (135 loc) · 4.93 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
})
const withPWA = require('next-pwa')
const runtimeCaching = require('next-pwa/cache')
module.exports = withMDX(withPWA({
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'md', 'mdx'],
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}
return config
},
pwa: {
dest: 'public',
runtimeCaching,
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
},
async redirects() {
return [
{
source: '/snippets/add-comments-to-nextjs-website',
destination: '/articles/add-comments-to-nextjs-website',
permanent: true,
},
{
source: '/snippets/add-firebase-to-flutter-mobile-app',
destination: '/articles/add-firebase-to-flutter-mobile-app',
permanent: true,
},
{
source: '/tutorials/add-firebase-to-nextjs',
destination: '/articles/add-firebase-to-nextjs',
permanent: true,
},
{
source: '/snippets/add-google-analytics-to-nextjs',
destination: '/articles/add-google-analytics-to-nextjs',
permanent: true,
},
{
source: '/snippets/add-splitbee-analytics-to-nextjs',
destination: '/articles/add-splitbee-analytics-to-nextjs',
permanent: true,
},
{
source: '/snippets/advanced-chakra-ui-do-you-know-all-5',
destination: '/articles/advanced-chakra-ui-do-you-know-all-5',
permanent: true,
},
{
source: '/snippets/chakra-ui-mobile-navbar',
destination: '/articles/chakra-ui-mobile-navbar',
permanent: true,
},
{
source: '/snippets/create-responsive-navbar-using-chakra-ui',
destination: '/articles/create-responsive-navbar-using-chakra-ui',
permanent: true,
},
{
source: '/snippets/flutter-bottom-navigation-bar',
destination: '/articles/flutter-bottom-navigation-bar',
permanent: true,
},
{
source: '/snippets/generate-dynamic-sitemap',
destination: '/articles/generate-dynamic-sitemap',
permanent: true,
},
{
source: '/snippets/how-to-compare-dates-in-javascript',
destination: '/articles/how-to-compare-dates-in-javascript',
permanent: true,
},
{
source: '/snippets/how-to-create-react-native-app',
destination: '/articles/how-to-create-react-native-app',
permanent: true,
},
{
source: '/tutorials/java-inheritance-tutorial',
destination: '/articles/java-inheritance-tutorial',
permanent: true,
},
{
source: '/snippets/make-div-float-up-hover-css',
destination: '/articles/make-div-float-up-hover-css',
permanent: true,
},
{
source: '/snippets/map-function-with-dart-lists',
destination: '/articles/map-function-with-dart-lists',
permanent: true,
},
{
source: '/snippets/next-image-position-relative',
destination: '/articles/next-image-position-relative',
permanent: true,
},
{
source: '/tutorials/nextjs-crash-course-build-a-developer-portfolio-website',
destination: '/articles/nextjs-crash-course-build-a-developer-portfolio-website',
permanent: true,
},
{
source: '/snippets/nextjs-mdx-quickstart',
destination: '/articles/nextjs-mdx-quickstart',
permanent: true,
},
{
source: '/tutorials/todo-app-nextjs-chakraui-firebase',
destination: '/articles/todo-app-nextjs-chakraui-firebase',
permanent: true,
},
{
source: '/snippets/use-disclosure-menu-chakra-ui',
destination: '/articles/use-disclosure-menu-chakra-ui',
permanent: true,
},
{
source: '/snippets/using-react-useeffect',
destination: '/articles/using-react-useeffect',
permanent: true,
},
{
source: '/learn',
destination: '/courses',
permanent: true,
},
]
},
}))