forked from penx-labs/themes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
56 lines (50 loc) · 1.49 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
55
56
const { env } = require('./server/env')
/**
* @type {import('next').NextConfig}
*/
module.exports = {
experimental: {
serverActions: {
allowedOrigins: ['app.localhost:3000'],
},
},
/**
* Dynamic configuration available for the browser and server.
* Note: requires `ssr: true` or a `getInitialProps` in `_app.tsx`
* @link https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
*/
publicRuntimeConfig: {
NODE_ENV: env.NODE_ENV,
},
transpilePackages: [
'react-tweet',
'plantree-theme-micro',
'plantree-theme-card',
'plantree-theme-minimal',
],
images: {
remotePatterns: [
{ hostname: 'public.blob.vercel-storage.com' },
{ hostname: '2cil7amusloluyl8.public.blob.vercel-storage.com' },
{ hostname: '*.public.blob.vercel-storage.com' },
{ hostname: '*.spaceprotocol.xyz' },
{ hostname: 'res.cloudinary.com' },
{ hostname: 'abs.twimg.com' },
{ hostname: 'pbs.twimg.com' },
{ 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
},
}