-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
54 lines (53 loc) · 1.24 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
45
46
47
48
49
50
51
52
53
54
// next.config.js
const { withAuth } = require("next-auth/react");
const { withSentryConfig } = require("@sentry/nextjs");
const withPlugins = require("next-compose-plugins");
const withTM = require("next-transpile-modules");
module.exports = withPlugins(
[
[
withTM,
{
transpileModules: ["@supabase/supabase-js", "supabase"],
},
],
[
withAuth,
{
providers: [
{
id: "google",
name: "Google",
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
},
// Add more providers if needed
],
secret: process.env.NEXTAUTH_SECRET,
callbacks: {
async session({ session, token, user }) {
session.user.id = token.sub; // Set user ID in session
return session;
},
},
},
],
[
withSentryConfig,
{
silent: true, // Prevent Sentry from logging to the console in development mode
// ... Sentry configuration
},
],
],
{
reactStrictMode: true,
swcMinify: true,
experimental: {
appDir: true,
},
images: {
domains: ["lh3.googleusercontent.com"],
},
}
);