Repository navigation
Expand file tree
/
Copy pathnext.config.js
More file actions
50 lines (48 loc) · 1.56 KB
/
Copy pathnext.config.js
File metadata and controls
50 lines (48 loc) · 1.56 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
44
45
46
47
48
49
50
const withPWA = require('next-pwa')({
dest: 'public',
register: true,
skipWaiting: true,
reloadOnOnline: true,
buildExcludes: [/middleware-manifest.json$/],
customWorkerDir: 'worker',
additionalManifestEntries: [
{ url: process.env.NODE_ENV === 'development' ? '/worker-development.js' : '/worker.js', revision: Date.now().toString() }
],
// Keep first production deploys boring. The inherited PWA worker is
// memory-heavy during build and is not required for Castora's launch shell.
// Re-enable with CASTORA_ENABLE_PWA=true once the full client wiring is ready.
disable: process.env.NODE_ENV === 'development' || process.env.CASTORA_ENABLE_PWA !== 'true'
})
/** @type {import('next').NextConfig} */
const nextConfig = {
// todo switch back to true until the accounts situation is resolved
reactStrictMode: false,
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
// todo switch back when i have time
ignoreDuringBuilds: true,
},
images: {
domains: ['pbs.twimg.com', 'video.twimg.com', 'images.ctfassets.net', 'gateway.pinata.cloud', 'supercast.mypinata.cloud', 'imagedelivery.net'],
},
experimental: {
serverActions: true,
},
async redirects() {
return [
{
source: '/:path*',
has: [
{
type: 'host',
value: 'castora.arcabot.ai',
},
],
destination: 'https://castora.social/:path*',
permanent: true,
},
]
},
}
module.exports = withPWA(nextConfig)