Skip to content
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
3 changes: 3 additions & 0 deletions src/frontend/pull-global-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { fileURLToPath } from 'node:url';
dotenv.config({
path: '.env',
});
dotenv.config({
path: '../../.env',
});

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand Down
5 changes: 4 additions & 1 deletion src/marketing/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import storyblok from '@storyblok/astro';
import basicSsl from '@vitejs/plugin-basic-ssl';
import { loadEnv } from 'vite';
import netlify from '@astrojs/netlify';
import path from 'path';

const globalEnvPath = path.resolve(process.cwd(), '..', '..');
const globalEnv = loadEnv('', globalEnvPath, 'DFX_NETWORK');
const env = loadEnv('', process.cwd(), 'STORYBLOK_TOKEN');

const dfxNetwork = process.env.DFX_NETWORK ?? 'local';
const dfxNetwork = globalEnv.DFX_NETWORK ?? 'local';
const isMainnet = dfxNetwork === 'ic';
const isStaging = dfxNetwork === 'staging';

Expand Down
3 changes: 2 additions & 1 deletion src/marketing/src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import dotenv from 'dotenv';
import path from 'path';

dotenv.config({
path: '.env',
path: path.resolve(process.cwd(), '..', '..', '.env'),
});

const dfxNetwork = process.env.DFX_NETWORK ?? 'local';
Expand Down
4 changes: 2 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"angular.json",
"dfx.json",
"prettier.config.cjs",
"tsconfig.json",
".env"
"tsconfig.json"
],
"tasks": {
"build": {
"outputs": ["dist/**", "build/**", ".docusaurus/**", "loader/**", "www"],
"inputs": ["$TURBO_DEFAULT$", ".env"],
"dependsOn": ["^build"]
},
"test": {
Expand Down
Loading