-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.js
More file actions
35 lines (32 loc) · 816 Bytes
/
next.config.js
File metadata and controls
35 lines (32 loc) · 816 Bytes
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
/** @type {import('next').NextConfig} */
const withPWA = require('@ducanh2912/next-pwa').default
const NEXT_PUBLIC_MAILER_URI = process.env.NEXT_PUBLIC_MAILER_URI;
const nextConfig = {
webpack: (config) => {
config.resolve.fallback = {
...config.resolve.fallback,
"tfhe_bg.wasm": require.resolve("tfhe/tfhe_bg.wasm"),
};
return config;
},
async rewrites() {
return [
{
source: "/api/:path*",
destination: `${NEXT_PUBLIC_MAILER_URI}/:path*`,
},
];
},
};
module.exports = withPWA({
dest: "public",
cacheOnFrontEndNav: true,
aggressiveFrontEndNavCaching: true,
reloadOnOnline: true,
swcMinify: true,
// disable: process.env.NODE_ENV === "development",
disable: false,
workboxOptions: {
disableDevLogs: true,
},
})(nextConfig);