mango-ui-v3/next.config.js

57 lines
1.1 KiB
JavaScript
Raw Normal View History

const { i18n } = require('./next-i18next.config')
2022-02-03 11:14:23 -08:00
const moduleExports = {
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,
},
]
},
2021-08-29 21:56:27 -07:00
webpack: (config, { isServer }) => {
// Important: return the modified config
if (!isServer) {
2021-08-29 21:56:27 -07:00
config.resolve.fallback.fs = false
}
config.module.rules.push({
2021-08-29 21:56:27 -07:00
test: /\.svg?$/,
oneOf: [
{
use: [
{
loader: '@svgr/webpack',
options: {
prettier: false,
svgo: true,
svgoConfig: {
plugins: [{ removeViewBox: false }],
},
titleProp: true,
},
},
],
issuer: {
and: [/\.(ts|tsx|js|jsx|md|mdx)$/],
},
},
],
})
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