Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed metamask deps conflict on linux #45

Merged
merged 12 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PORT = 1212

# MQ_URL=amqp://localhost:5672
TASK_EXECUTOR_URL=http://localhost:2591
# TASK_EXECUTOR_URL=http://172.18.0.255:2591

REGISTRATION_SERVICE_API_URL=http://sbip-g2.d2.comp.nus.edu.sg:11000/fn-discovery
DID_VERIFIER_SERVICE_API_URL=http://sbip-g2.d2.comp.nus.edu.sg:11000/did-verifier
Expand Down
30 changes: 26 additions & 4 deletions .erb/configs/webpack.config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ import webpack from 'webpack';
import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin';
import webpackPaths from './webpack.paths';
import { dependencies as externals } from '../../release/app/package.json';
import path from 'path';


// Load .env file
const env = dotenv.config().parsed;

console.log("process.platform", process.platform)
// Determine TASK_EXECUTOR_URL based on the OS
// const TASK_EXECUTOR_URL = process.platform === "win32"
// ? "http://localhost:2591"
// : "http://172.18.0.255:2591";

const IPV4_ADDRESS = process.platform === "win32" ? "173.18.0.255" : "172.18.0.255"
console.log("IPV4_ADDRESS", IPV4_ADDRESS)
// Merge custom environment variables
const environmentVariables = {
...env, // Existing .env variables
// TASK_EXECUTOR_URL, // Add TASK_EXECUTOR_URL
IPV4_ADDRESS,
NODE_ENV: 'production', // You can keep or remove this line depending on your setup
};


const configuration: webpack.Configuration = {
externals: [...Object.keys(externals || {})],
Expand Down Expand Up @@ -58,13 +80,13 @@ const configuration: webpack.Configuration = {
},
// There is no need to add aliases here, the paths in tsconfig get mirrored
plugins: [new TsconfigPathsPlugins()],
alias: {
react: path.resolve('./node_modules/react')
}
},

plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',
...dotenv.config().parsed,
}),
new webpack.EnvironmentPlugin(environmentVariables),
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module.exports = {
'camelcase': 'off',
'no-else-return': 'off',
'consistent-return': 'off',
'no-use-before-define': 'off',
'no-await-in-loop': 'off',
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
'react/function-component-definition': [
2,
Expand Down
Loading
Loading