mango-ui-v3/next.config.js

34 lines
683 B
JavaScript

const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withBundleAnalyzer({
target: 'serverless',
typescript: {
ignoreBuildErrors: true, // TODO: remove this before mainnet
},
webpack(config, { isServer }) {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: 'empty',
}
}
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
})
return config
},
async redirects() {
return [
{
source: '/',
destination: '/perp/BTC',
permanent: false,
},
]
},
})