Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile away local debug for publish #1494

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Nov 14, 2023

Until our primary consumer of the VM natively supports import.meta.env and can incrementally opt in to features via that macro system, we must compile away certain things as they were before in 0.84.x and prior.
Instead of compiling away all DEV to false (which would hide a bunch of info from ember), i made a new flag

Here is evidence of the local debug stuff being compiled away:
image
(top: compiled, buttom: source)

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review November 14, 2023 14:02
export const LOCAL_DEBUG: true | false =
import.meta.env.DEV &&
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know how to best extend the meta.env type here, so I ignored it for now since it's compiled away during publish, and only used in this one file.

@NullVoxPopuli NullVoxPopuli merged commit 161672c into master Nov 14, 2023
@NullVoxPopuli NullVoxPopuli deleted the compile-away-local-debug-for-publish branch November 14, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants