-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.ts
40 lines (36 loc) · 1.27 KB
/
next.config.ts
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
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
experimental: {
turbo: {
resolveExtensions: ['.mdx', '.tsx', '.ts', '.jsx', '.js', '.mjs', '.json'],
},
},
eslint: {
ignoreDuringBuilds: true,
},
// trailingSlash: true, // Ensures compatibility with GitHub Pages
webpack: (config, { isServer }) => {
// Modify Webpack's watchOptions
config.watchOptions = {
poll: 1000, // Enable polling
aggregateTimeout: 300, // Delay before rebuilding
ignored: /node_modules/, // Example: Exclude node_modules
}
return config
},
env: {
// Server-side only variables
VAPID_PRIVATE_KEY: process.env.VAPID_PRIVATE_KEY,
DATABASE_URL: process.env.DATABASE_URL,
FCM_SERVER_KEY: process.env.FCM_SERVER_KEY,
REDDIT_CLIENT_ID: process.env.REDDIT_CLIENT_ID,
REDDIT_CLIENT_SECRET: process.env.REDDIT_CLIENT_SECRET,
REDDIT_USERNAME: process.env.REDDIT_USERNAME,
REDDIT_PASSWORD: process.env.REDDIT_PASSWORD,
// Public variables (exposed to client-side)
NEXT_PUBLIC_VAPID_PUBLIC_KEY: process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY,
NEXT_PUBLIC_MATOMO_URL: process.env.NEXT_PUBLIC_MATOMO_URL,
NEXT_PUBLIC_MATOMO_SITE_ID: process.env.NEXT_PUBLIC_MATOMO_SITE_ID,
},
}
export default nextConfig