2022-07-14 16:36:31 -07:00
|
|
|
const { i18n } = require('./next-i18next.config')
|
|
|
|
|
2022-04-12 13:48:22 -07:00
|
|
|
/** @type {import('next').NextConfig} */
|
|
|
|
const nextConfig = {
|
2022-07-14 16:36:31 -07:00
|
|
|
i18n,
|
2022-05-03 21:20:14 -07:00
|
|
|
env: {
|
|
|
|
BROWSER: true,
|
|
|
|
},
|
2022-08-11 19:27:21 -07:00
|
|
|
images: {
|
|
|
|
domains: ['raw.githubusercontent.com'],
|
|
|
|
},
|
2022-07-11 20:00:22 -07:00
|
|
|
reactStrictMode: true,
|
2022-07-12 19:02:36 -07:00
|
|
|
webpack: (config, opts) => {
|
|
|
|
if (!opts.isServer) {
|
2022-05-03 21:20:14 -07:00
|
|
|
// don't resolve 'fs' module on the client to prevent this error on build --> Error: Can't resolve 'fs'
|
|
|
|
config.resolve.fallback = {
|
|
|
|
fs: false,
|
|
|
|
os: false,
|
|
|
|
path: false,
|
|
|
|
process: false,
|
|
|
|
util: false,
|
2022-07-12 19:02:36 -07:00
|
|
|
assert: require.resolve('assert'),
|
2022-05-03 21:20:14 -07:00
|
|
|
stream: false,
|
2022-05-31 18:41:18 -07:00
|
|
|
http: false,
|
|
|
|
https: false,
|
|
|
|
querystring: false,
|
2022-05-03 21:20:14 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return config
|
|
|
|
},
|
2022-04-12 13:48:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = nextConfig
|