-
Notifications
You must be signed in to change notification settings - Fork 68
/
next.config.mjs
50 lines (44 loc) · 1.63 KB
/
next.config.mjs
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
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev'
import { withTheme } from './withTheme.mjs'
// Here we use the @cloudflare/next-on-pages next-dev module to allow us to use bindings during local development
// (when running the application with `next dev`), for more information see:
// https://github.com/cloudflare/next-on-pages/blob/main/internal-packages/next-dev/README.md
if (process.env.NODE_ENV === 'development') {
await setupDevPlatform()
}
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
// asyncWebAssembly: true,
},
transpilePackages: ['react-tweet'],
images: {
dangerouslyAllowSVG: true,
contentDispositionType: 'attachment',
remotePatterns: [
{ hostname: 'public.blob.vercel-storage.com' },
{ hostname: '2cil7amusloluyl8.public.blob.vercel-storage.com' },
{ hostname: '*.public.blob.vercel-storage.com' },
{ hostname: '*.spaceprotocol.xyz' },
{ hostname: '*.penx.io' },
{ hostname: 'penx.io' },
{ hostname: '0xz.io' },
{ hostname: '*.0xz.io' },
{ hostname: 'avatar.vercel.sh' },
{ hostname: 'avatars.githubusercontent.com' },
{ hostname: 'www.google.com' },
{ hostname: 'flag.vercel.app' },
],
},
webpack: (config, { isServer }) => {
// https://stackoverflow.com/questions/64926174/module-not-found-cant-resolve-fs-in-next-js-application
// config.resolve.fallback = {
// fs: false,
// net: false,
// tls: false,
// }
// config.externals.push('pino-pretty', 'lokijs', 'encoding', 'bcrypt')
return config
},
}
export default withTheme(nextConfig)