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

const enums in production #100

Open
s-cork opened this issue Jul 23, 2021 · 1 comment
Open

const enums in production #100

s-cork opened this issue Jul 23, 2021 · 1 comment

Comments

@s-cork
Copy link
Contributor

s-cork commented Jul 23, 2021

We'll need to make sure the const enums get converted to their raw values in production
esbuild doesn't do that for us unfortunately
https://esbuild.github.io/content-types/#no-type-system

@s-cork s-cork mentioned this issue Jul 23, 2021
@s-cork
Copy link
Contributor Author

s-cork commented Jul 26, 2021

I have a feeling we may need to export these twice.

export const enum ASTKind {
    mod,
    Module,
    Interactive
}
export const ModuleKind = ASTKind.Module

What i've read so far about minifying constant enums across modules hasn't looked promising.

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

No branches or pull requests

1 participant