Skip to content

Commit 130a33b

Browse files
committedJul 19, 2023
Fix production build
1 parent 2908824 commit 130a33b

6 files changed

+9
-7
lines changed
 

‎.erb/configs/webpack.config.base.ts

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import webpack from 'webpack';
66
import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin';
7-
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
87
import webpackPaths from './webpack.paths';
98
import { dependencies as externals } from '../../release/app/package.json';
109

@@ -51,7 +50,6 @@ const configuration: webpack.Configuration = {
5150
},
5251

5352
plugins: [
54-
new NodePolyfillPlugin(),
5553
new webpack.EnvironmentPlugin({
5654
NODE_ENV: 'production',
5755
}),

‎.erb/configs/webpack.config.renderer.dev.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import chalk from 'chalk';
77
import { merge } from 'webpack-merge';
88
import { execSync, spawn } from 'child_process';
99
import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin';
10+
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
1011
import baseConfig from './webpack.config.base';
1112
import webpackPaths from './webpack.paths';
1213
import checkNodeEnv from '../scripts/check-node-env';
@@ -124,7 +125,7 @@ const configuration: webpack.Configuration = {
124125
sourceType: 'var',
125126
}),
126127
]),
127-
128+
new NodePolyfillPlugin(),
128129
new webpack.NoEmitOnErrorsPlugin(),
129130

130131
/**

‎.erb/configs/webpack.config.renderer.prod.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
1010
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
1111
import { merge } from 'webpack-merge';
1212
import TerserPlugin from 'terser-webpack-plugin';
13+
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
1314
import baseConfig from './webpack.config.base';
1415
import webpackPaths from './webpack.paths';
1516
import checkNodeEnv from '../scripts/check-node-env';
@@ -110,7 +111,7 @@ const configuration: webpack.Configuration = {
110111
NODE_ENV: 'production',
111112
DEBUG_PROD: false,
112113
}),
113-
114+
new NodePolyfillPlugin(),
114115
new MiniCssExtractPlugin({
115116
filename: 'style.css',
116117
}),

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"start:main": "cross-env NODE_ENV=development electronmon -r ts-node/register/transpile-only .",
4747
"start:preload": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.preload.dev.ts",
4848
"start:renderer": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.renderer.dev.ts",
49-
"test": "jest"
49+
"test": "jest",
50+
"clean": "ts-node ./.erb/scripts/clean.js"
5051
},
5152
"browserslist": [],
5253
"prettier": {

‎src/renderer/App.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Web3Auth } from '@web3auth/modal';
1010
import Dashboard from './pages/Dashboard';
1111
import Train from './pages/Train';
1212
import { WalletContextProvider } from './context/walletContext';
13-
import Faucet from './pages/faucet';
13+
import Faucet from './pages/Faucet';
1414
import { CONFIG } from './config';
1515

1616
export default function App() {
@@ -65,6 +65,7 @@ export default function App() {
6565

6666
const web3AuthInstance = new Web3Auth({
6767
clientId: CONFIG.WEB3_AUTH_CLIENT_ID,
68+
web3AuthNetwork: 'cyan',
6869
chainConfig: {
6970
chainNamespace: 'eip155',
7071
chainId: `0x${chains[0].id.toString(16)}`,

‎src/renderer/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const CONFIG = {
22
WEB3_AUTH_CLIENT_ID:
3-
'BBs8gwA0_4q7zmg2GoMu-1OuaN58Nj4tJBgiZfjh0Vz0rkym2Iuy96N0TC-wSQUE7wIZv4QINxf59xAICVih6fQ',
3+
'BLbxOA9fc1ILYPvThN4MIuRLL9QH-BbrXYa9ExH2eOYihHHicQXWDhWQED15gDk_DJX8--22XhLGMyeiAM5nWYk',
44
WEB3_AUTH_RPC:
55
'https://polygon-mumbai.g.alchemy.com/v2/Qsvi2mE7TTt44pEwkojqyqdRb1s0xAQV',
66
};

0 commit comments

Comments
 (0)