Skip to content

Commit

Permalink
Fix broken webpack build in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed Jun 25, 2021
1 parent dc16c5a commit 755183b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions packages/config/src/chainConfig/default.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import {ACTIVE_PRESET} from "@chainsafe/lodestar-params";
import {ACTIVE_PRESET, PresetName} from "@chainsafe/lodestar-params";
import {IChainConfig} from "./types";
import {chainConfig as mainnet} from "./presets/mainnet";
import {chainConfig as minimal} from "./presets/minimal";

// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/no-unsafe-member-access
export const defaultChainConfig = require(`./presets/${ACTIVE_PRESET}`).chainConfig as IChainConfig;
let defaultChainConfig: IChainConfig;

switch (ACTIVE_PRESET) {
case PresetName.minimal:
defaultChainConfig = minimal;
break;
case PresetName.mainnet:
default:
defaultChainConfig = mainnet;
break;
}

export {defaultChainConfig};

0 comments on commit 755183b

Please sign in to comment.