Skip to content

Commit

Permalink
Fix: stcelo v1 WC v2 fix attempts (#140)
Browse files Browse the repository at this point in the history
* fix: attempt to fix by using a single network

* fix: remove minimization
  • Loading branch information
nicolasbrugneaux authored Jul 4, 2023
1 parent 77ada56 commit 4cc8ec1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
37 changes: 32 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -35,6 +35,8 @@ const App = ({ Component, pageProps, router }: AppProps) => {
url: '',
walletConnectProjectId: '3bcdb6756cdd7179c359c03ae1e8aca2',
}}
defaultNetwork={Mainnet.name}
networks={[Mainnet]}
connectModal={{
title: <span>Connect Wallet</span>,
providersOptions: { searchable: false },
Expand Down

1 comment on commit 4cc8ec1

@vercel
Copy link

@vercel vercel bot commented on 4cc8ec1 Jul 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.