-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
34 lines (32 loc) · 1.01 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
/** @type {import('next').NextConfig} */
var webpack = require('webpack');
const nextConfig = {
output: 'export',
webpack: (config) => {
config.experiments = {
...config.experiments,
topLevelAwait: true,
}
config.resolve.fallback = {
process: require.resolve('process/browser'),
zlib: require.resolve('browserify-zlib'),
stream: require.resolve('stream-browserify'),
util: require.resolve('util'),
buffer: require.resolve('buffer'),
asset: require.resolve('assert'),
}
config.externals.push({ sharp: 'commonjs sharp', canvas: 'commonjs canvas' })
config.plugins.push(
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
process: 'process/browser',
})
)
return config
},
env: {
// declare here all your variables
SERVER_URL: process.env.SERVER_URL,
}
}
module.exports = nextConfig