2021-10-20 05:42:40 -07:00
|
|
|
const { i18n } = require('./next-i18next.config')
|
|
|
|
|
2022-02-03 11:14:23 -08:00
|
|
|
const moduleExports = {
|
2021-10-20 05:42:40 -07:00
|
|
|
i18n,
|
2021-11-14 11:21:36 -08:00
|
|
|
async redirects() {
|
|
|
|
return [
|
2022-01-31 09:48:48 -08:00
|
|
|
{
|
|
|
|
source: '/market',
|
|
|
|
destination: '/',
|
|
|
|
permanent: true,
|
|
|
|
},
|
2021-11-14 11:21:36 -08:00
|
|
|
{
|
|
|
|
source: '/spot/:name',
|
|
|
|
destination: '/',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/perp/:name',
|
|
|
|
destination: '/',
|
|
|
|
permanent: true,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
2022-03-25 04:17:29 -07:00
|
|
|
webpack: (config, options) => {
|
2021-08-29 21:56:27 -07:00
|
|
|
// Important: return the modified config
|
2022-03-25 04:17:29 -07:00
|
|
|
if (!options.isServer) {
|
2021-08-29 21:56:27 -07:00
|
|
|
config.resolve.fallback.fs = false
|
2021-07-18 10:24:15 -07:00
|
|
|
}
|
2022-03-24 19:49:19 -07:00
|
|
|
|
2021-03-30 15:47:08 -07:00
|
|
|
config.module.rules.push({
|
2022-03-24 19:49:19 -07:00
|
|
|
test: /\.svg$/,
|
|
|
|
use: ['@svgr/webpack'],
|
2021-03-30 15:47:08 -07:00
|
|
|
})
|
2022-03-24 19:49:19 -07:00
|
|
|
|
2022-03-25 04:17:29 -07:00
|
|
|
if (process.env.ANALYZE === 'true') {
|
|
|
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
|
|
|
|
config.plugins.push(
|
|
|
|
new BundleAnalyzerPlugin({
|
|
|
|
analyzerMode: 'static',
|
|
|
|
reportFilename: options.isServer
|
|
|
|
? './analyze/server.html'
|
|
|
|
: './analyze/client.html',
|
|
|
|
})
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-03-30 15:47:08 -07:00
|
|
|
return config
|
|
|
|
},
|
2021-08-29 21:56:27 -07:00
|
|
|
}
|
2022-02-03 11:14:23 -08:00
|
|
|
|
2022-02-22 13:45:25 -08:00
|
|
|
module.exports = moduleExports
|