-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
56 lines (51 loc) · 1.38 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
import CopyPlugin from 'copy-webpack-plugin'
// eslint-disable-next-line import/extensions
await import('./src/env.js')
/** @type {import("next").NextConfig} */
const config = {
reactStrictMode: true,
experimental: {
serverComponentsExternalPackages: ['@node-rs/argon2']
},
images: {
remotePatterns: [
{
hostname: 'images.unsplash.com'
},
{
hostname: 'www.spacesworks.com',
pathname: '/wp-content/themes/spaces/img/**'
},
{
hostname: 'cdn-images.wework.com',
pathname: '/images/**'
},
{
hostname: 'ctfassets.imgix.net'
},
{
hostname: 'www.coworkingcafe.com'
}
]
},
webpack: (config, { webpack }) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
config.plugins.push(
new CopyPlugin({
patterns: [
{
from: 'node_modules/leaflet/dist/images',
to: '../public/leaflet/images'
}
]
})
)
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
config.plugins.push(new webpack.IgnorePlugin({
resourceRegExp: /^pg-native$|^cloudflare:sockets$/
}))
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return config
}
}
export default config