You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Without the build optimizer (using -prod --aot --build-optimizer=false)
The highlighted code snippet here (picture from the ESM 5 file button.js file) is being removed when running with the build optimizer. If you add a console.log before, the console.log stays, just the specific code snippet is being removed.
Switching to a ternary, or simple if-else will fix the issue.
Bug Report or Feature Request (mark with an
x)Area
Versions
Repro steps
Clone this reproduction repository and run the app in two different ways:
-prod --aot)-prod --aot --build-optimizer=false)The highlighted code snippet here (picture from the ESM 5 file button.js file) is being removed when running with the build optimizer. If you add a
console.logbefore, theconsole.logstays, just the specific code snippet is being removed.Switching to a ternary, or simple if-else will fix the issue.
with build-optimizer disabled

_with build-optimizer enabled

Mention any other details that might be useful
Related to Angular Material. angular/components#9360
cc. @filipesilva