Skip to content

Conversation

@wouterlucas
Copy link
Contributor

Fixes #544 (partially) - will limit it to:

function assertTruthy(condition, message) {
  return;
}

In the production bundle. Removing it entirely is too intrusive right now as we would need to inline every assertTruthy check.

@wouterlucas wouterlucas requested a review from jfboeve April 1, 2025 21:09
@wouterlucas wouterlucas force-pushed the fix/isProductionFlag branch from d57c81c to 7fe40ad Compare April 1, 2025 21:24
@chiefcll
Copy link
Contributor

chiefcll commented Apr 2, 2025

LGTM - like the DEV flag

src/utils.ts Outdated
message?: string,
): asserts condition {
if (isProductionEnvironment() === true) return;
if (isProductionEnvironment) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isProductionEnvironment === true

@wouterlucas wouterlucas requested a review from jfboeve April 5, 2025 11:57
@wouterlucas wouterlucas added this pull request to the merge queue Apr 5, 2025
Merged via the queue into main with commit b0d8649 Apr 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 [BUG] - isProductionEnv() not removed at build time

4 participants