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: '/spot/BTC', permanent: false, }, ] }, })