forked from fallaciousreasoning/progrssive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
38 lines (35 loc) · 969 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
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const withPWA = require('next-pwa')({
dest: 'public'
});
module.exports = withPWA({
eslint: {
ignoreDuringBuilds: true
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
if (process.env.ANALYZE) {
config.plugins.push(
new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: isServer ? 8888 : 8889,
openAnalyzer: true,
})
)
}
// Add support for importing SVGs.
config.module.rules.push({
test: /\.svg$/,
use: ["@svgr/webpack"]
});
return config
},
async redirects() {
return [
{
source: '/',
destination: '/stream/all',
permanent: true,
},
]
},
});