-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathnext.config.js
45 lines (41 loc) · 882 Bytes
/
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
const withPlugins = require('next-compose-plugins')
const withSvgr = require('next-svgr')
const withPWA = require('next-pwa')
const withSourceMaps = require('@zeit/next-source-maps')
module.exports = withPlugins([
{
distDir: 'build',
productionBrowserSourceMaps: true,
future: { webpack5: true },
typescript: {
// !! WARN !!
ignoreBuildErrors: true,
},
rewrites() {
return [
{
source: '/rooms/:id',
destination: '/rooms/room'
},
{
source: '/admin/rooms/:id',
destination: '/rooms/admin'
},
]
}
},
[withPWA, {
pwa: {
disable: process.env.NODE_ENV === 'development',
dest: 'public',
register: true,
sw: '/sw.js'
}
}],
[withSourceMaps, {
webpack(config, options) {
return config
}
}],
withSvgr
])