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

Look in to using @embroider/macros for better production stripping #484

Open
NullVoxPopuli opened this issue May 11, 2024 · 1 comment
Open

Comments

@NullVoxPopuli
Copy link
Sponsor Contributor

macros use a babel plugin for dead code elimination, which is more reliable than assuming folks get their terser config correct (what test-waiters currently relies on)

@NullVoxPopuli
Copy link
Sponsor Contributor Author

NullVoxPopuli commented May 11, 2024

Current approach is using DEBUG from @glimmer/env (which is also via babel plugin, but without the dead-code-elimination).

maybe we can have better stripping similar to this strategy:

export const registerWaiter = DEV ? _realRegisterWaiter : voidFunction;
export const waitForPromise = DEV ? _realWaitForPromise : identityFunction;
// etc

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