-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
40 lines (33 loc) · 1002 Bytes
/
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
// https://nextjs.org/docs/api-reference/next.config.js/introduction
const withPlugins = require('next-compose-plugins')
const withYaml = require('next-plugin-yaml')
const withImages = require('next-images')
let nextConfig = {
// https://nextjs.org/docs/messages/webpack5
future: { webpack5: true },
webpack: (config, { isServer }) => {
if (!isServer) {
// Unset client-side javascript that only works server-side
// https://github.com/vercel/next.js/issues/7755#issuecomment-508633125
config.resolve = {
...config.resolve,
fallback: {
fs: 'empty',
module: 'empty',
},
}
}
return config
},
// https://nextjs.org/docs/api-reference/next.config.js/basepath
basePath: process.env.BASE_PATH || '',
// https://nextjs.org/docs/basic-features/image-optimization
images: {
loader: 'cloudinary',
path: '/images/_loader/'
},
}
module.exports = withPlugins([
withImages,
withYaml,
], nextConfig)