-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnext.config.js
More file actions
43 lines (40 loc) · 1.19 KB
/
next.config.js
File metadata and controls
43 lines (40 loc) · 1.19 KB
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 runtimeCaching = require("next-pwa/cache");
const withPWA = require("next-pwa")({
dest: "public",
register: true,
skipWaiting: true,
runtimeCaching,
disable: process.env.NODE_ENV !== "production", // Enable PWA only in production
});
const { createVanillaExtractPlugin } = require("@vanilla-extract/next-plugin");
const withVanillaExtract = createVanillaExtractPlugin();
const nextConfig = withPWA({
images: {
remotePatterns: [
{ protocol: "https", hostname: "wonhee-bucket.s3.ap-northeast-2.amazonaws.com", port: "" },
{ protocol: "https", hostname: "picsum.photos", port: "" },
],
},
reactStrictMode: true,
swcMinify: true,
compiler: { styledComponents: true },
webpack(config) {
// Centralize fallback
config.resolve.fallback = {
...config.resolve.fallback,
net: false,
fs: false,
tls: false,
};
// Add SVG support
config.module.rules.push({
test: /\.svg$/i,
use: [{ loader: "@svgr/webpack", options: { icon: true } }],
});
return config;
},
async redirects() {
return [{ source: "/team", destination: "/team/find", permanent: true }];
},
});
module.exports = withVanillaExtract(nextConfig);