Skip to content

Commit

Permalink
set dist on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
srgooglo committed Oct 12, 2023
1 parent f7261e2 commit 76f1b61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/lib/api_wrapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const infisical = require("infisical-node")
global.isProduction = process.env.NODE_ENV === "production"

globalThis["__root"] = path.resolve(process.cwd())
globalThis["__src"] = path.resolve(globalThis["__root"], "src")
globalThis["__src"] = path.resolve(globalThis["__root"], global.isProduction ? "dist" : "src")

const customAliases = {
"root": globalThis["__root"],
Expand Down Expand Up @@ -98,7 +98,7 @@ async function main({
main_filePath,
force_infisical,
} = {}) {
const API = require(main_filePath ?? path.resolve(globalThis["__src"], "api.js")).default
const API = require(global._global_main_filePath ?? main_filePath ?? path.resolve(globalThis["__src"], "api.js")).default

if (force_infisical || process.env.INFISICAL_TOKEN) {
await injectEnvFromInfisical()
Expand Down

0 comments on commit 76f1b61

Please sign in to comment.