diff --git a/next.config.js b/next.config.js index cc7112ba..277e45d7 100755 --- a/next.config.js +++ b/next.config.js @@ -4,18 +4,45 @@ const webpack = require('webpack'); const nextConfig = { reactStrictMode: false, swcMinify: true, - webpack: (config, { isServer }) => { - if (!isServer) { - config.resolve.fallback.net = false; - config.resolve.fallback.fs = false; - } + webpack: (config) => { + config.resolve.fallback = { fs: false, net: false, tls: false }; config.plugins.push( new webpack.BannerPlugin({ banner: 'For third party licenses check /THIRD_PARTY_LICENSES.txt', }) ); + config.optimization.minimizer = []; return config; }, + async headers() { + return [ + { + source: '/manifest.json', + headers: [ + { + key: 'Access-Control-Allow-Origin', + value: '*', + }, + { + key: 'Access-Control-Allow-Methods', + value: 'GET,OPTIONS', + }, + { + key: 'Access-Control-Allow-Headers', + value: 'X-Requested-With, content-type, Authorization', + }, + ], + }, + ]; + }, + async rewrites() { + return [ + { + source: '/manifest.json', + destination: '/site.webmanifest', + }, + ]; + }, }; module.exports = nextConfig; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 76ff79e7..489bb418 100755 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,4 +1,4 @@ -import { CeloProvider, useCelo } from '@celo/react-celo'; +import { CeloProvider, Mainnet, useCelo } from '@celo/react-celo'; import '@celo/react-celo/lib/styles.css'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; @@ -35,6 +35,8 @@ const App = ({ Component, pageProps, router }: AppProps) => { url: '', walletConnectProjectId: '3bcdb6756cdd7179c359c03ae1e8aca2', }} + defaultNetwork={Mainnet.name} + networks={[Mainnet]} connectModal={{ title: Connect Wallet, providersOptions: { searchable: false },