diff --git a/client/env.ts b/client/env.ts new file mode 100644 index 000000000..bde333f61 --- /dev/null +++ b/client/env.ts @@ -0,0 +1,9 @@ +import { loadEnv, parseEnvPath } from '@ulixee/commons/lib/envUtils'; +import * as Path from 'path'; + +loadEnv(Path.join(__dirname, '..', 'core')); +loadEnv(Path.join(__dirname, '..', 'hero-core')); + +const env = process.env; + +if (env.ULX_DATA_DIR) env.ULX_DATA_DIR = parseEnvPath(env.ULX_DATA_DIR); diff --git a/client/index.ts b/client/index.ts index f6e464006..fbdf75b4e 100644 --- a/client/index.ts +++ b/client/index.ts @@ -32,6 +32,7 @@ import { Command } from './interfaces/IInteractions'; import { Hero, HeroReplay, FrameEnvironment, Tab, Resource, WebsocketResource } from './lib/extendables'; import ConnectionToHeroCore from './connections/ConnectionToHeroCore'; import DetachedElement from './lib/DetachedElement'; +import './env'; export default Hero;