forked from flotiq/flotiq-nextjs-event-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
43 lines (41 loc) · 1.1 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
const withImages = require('next-images')
const withPlugins = require('next-compose-plugins')
const withTM = require('next-transpile-modules')(['flotiq-components-react'])
module.exports = withPlugins(
[
withTM,
[
withImages,
{
exclude: /\.svg$/,
},
],
],
{
async rewrites() {
return [
{
source: '/',
destination: '/1',
},
]
},
images: {
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
dangerouslyAllowSVG: true,
disableStaticImages: true,
domains: ['api.flotiq.com'],
},
webpack: (config, options) => {
if (!options.isServer) {
config.resolve.alias['@sentry/node'] = '@sentry/browser'
}
config.module.rules.push({
test: /\.svg$/,
issuer: { and: [/\.(js|ts)x?$/] },
use: ['@svgr/webpack'],
})
return config
},
}
)