forked from Wasmswap/wasmswap-interface
-
Notifications
You must be signed in to change notification settings - Fork 25
/
next.config.js
42 lines (36 loc) · 911 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
41
42
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const withBundleJunoblocks = require('next-bundle-junoblocks')
const config = {
reactStrictMode: true,
target: 'serverless',
images: {
loader: 'cloudinary',
path: 'https://res.cloudinary.com/dk8s7xjsl/image/upload/',
},
webpack(config, { webpack }) {
config.plugins.push(
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
})
)
if (!config.resolve.fallback) {
config.resolve.fallback = {}
}
Object.assign(config.resolve.fallback, {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
})
return config
},
}
module.exports = withBundleAnalyzer(
process.env.BUNDLE_JUNOBLOCKS === 'true'
? withBundleJunoblocks(config)
: config
)