-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
44 lines (43 loc) · 1.39 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
44
/** @type {import('next').NextConfig} */
var path = require("path");
const withPWA = require('next-pwa')({
dest: 'public'
})
const nextConfig = {
reactStrictMode: false,
serverRuntimeConfig: {
// Will only be available on the server side
nextauthSecret: process.env.NEXTAUTH_SECRET,
nextauthUrl: process.env.NEXTAUTH_URL,
mailFrom: process.env.MAIL_FROM,
smtpHost: process.env.SMTP_HOST,
smtpPort: process.env.SMTP_PORT,
smtpUser: process.env.SMTP_USER,
smtpPassword: process.env.SMTP_PASSWORD,
smtpSecureEnabled: process.env.SMTP_SECURE_ENABLED,
},
publicRuntimeConfig: {
// Will be available on both server and client
posthogApiHost: process.env.POSTHOG_API_HOST,
posthogApiKey: process.env.POSTHOG_API_KEY,
termsUrl: process.env.TERMS_URL,
privacyUrl: process.env.PRIVACY_URL,
},
async redirects() {
return [{
source: "/",
destination: "/forms",
permanent: false,
}, ];
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
config.resolve.alias["react"] = path.resolve("./node_modules/react");
// Important: return the modified config
return config;
},
i18n: {
locales: ['en'],
defaultLocale: 'en',
},
};
module.exports = withPWA(nextConfig)