Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGuardiola committed Mar 20, 2024
1 parent c8727ca commit 00348b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"typecheck": "tsc --noEmit --skipLibCheck",
"lint": "eslint --ignore-path .gitignore .",
"check": "bun lint && bun typecheck",
"build": "bun gen && solid-start build",
"build": "NODE_ENV=production bun gen && solid-start build",
"start": "solid-start start",
"prod": "bun build && bun start"
},
Expand Down
11 changes: 5 additions & 6 deletions src/utils/is-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ export function isLocalhost() {
)
console.log("isLocalhost failed client side");
} else {
const { NODE_ENV, VITE_VERCEL_ENV } = process.env;
const { NODE_ENV, VERCEL_ENV } = process.env;
if (
NODE_ENV === "development" ||
(VITE_VERCEL_ENV && VITE_VERCEL_ENV === "development")
(VERCEL_ENV && VERCEL_ENV === "development")
)
console.log("isLocalhost failed server side", {
NODE_ENV,
VITE_VERCEL_ENV,
VERCEL_ENV,
});
}

Expand All @@ -31,9 +31,8 @@ export function isLocalhost() {
document.location.host.startsWith(host)
);

const { NODE_ENV, VITE_VERCEL_ENV } = process.env;
const { NODE_ENV, VERCEL_ENV } = process.env;
return Boolean(
NODE_ENV === "development" ||
(VITE_VERCEL_ENV && VITE_VERCEL_ENV === "development")
NODE_ENV === "development" || (VERCEL_ENV && VERCEL_ENV === "development")
);
}

0 comments on commit 00348b2

Please sign in to comment.