-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
41 lines (36 loc) · 1.05 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
/** @type {import('next').NextConfig} */
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')
module.exports = {
reactStrictMode: true,
images: {
// We don't use next/image because we want 'next export' to work, but we still
// have to specify a loader or else 'next export' complains
loader: 'imgix',
path: '/',
},
webpack: (config, options) => {
const { dev, isServer } = options
// Do not run type checking twice:
if (dev && isServer) {
config.plugins.push(new ForkTsCheckerWebpackPlugin())
}
return config
},
// Old /ShowBoard and /ShowCard pages
async redirects() {
return [
{
source: '/ShowBoard',
has: [{ type: 'query', key: 'boardId', value: '(?<boardId>[a-z0-9-]+)' }],
permanent: true,
destination: '/card?id=:boardId',
},
{
source: '/ShowCard',
has: [{ type: 'query', key: 'cardId', value: '(?<cardId>[a-z0-9-]+)' }],
permanent: true,
destination: '/card?id=:cardId',
},
]
},
}