ember-test-waiters icon indicating copy to clipboard operation
ember-test-waiters copied to clipboard

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

Open NullVoxPopuli opened this issue 1 year ago • 1 comments

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 avatar May 11 '24 17:05 NullVoxPopuli

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

NullVoxPopuli avatar May 11 '24 17:05 NullVoxPopuli