generated from CloudCannon/justice-nextjs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
43 lines (41 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
42
43
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true"
});
module.exports = withBundleAnalyzer({
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.fs = false;
}
return config;
},
swcMinify: true,
images: {
loader: "custom",
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840]
},
env: {
nextImageExportOptimizer_imageFolderPath: "public/images",
nextImageExportOptimizer_exportFolderPath: "out",
nextImageExportOptimizer_quality: 75,
nextImageExportOptimizer_storePicturesInWEBP: true,
nextImageExportOptimizer_generateAndUseBlurImages: true
},
redirects: async () => {
return [
{
source: "/slack",
destination: "https://go.eauw.org/slack",
statusCode: 308
},
{
source: "/feedback",
destination: "https://go.eauw.org/feedback",
statusCode: 302
}
];
},
experimental: {
// appDir: true
}
});