Title: build-optimizer: "logical OR" property assignment is removed · Issue #388 · angular/devkit · GitHub
Open Graph Title: build-optimizer: "logical OR" property assignment is removed · Issue #388 · angular/devkit
X Title: build-optimizer: "logical OR" property assignment is removed · Issue #388 · angular/devkit
Description: Bug Report or Feature Request (mark with an x) - [X] bug report -> please search issues before submitting - [ ] feature request Area - [X] devkit - [ ] schematics Versions `-- @angular/cli@1.6.4 `-- @angular-devkit/build-optimizer@0.0.38...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [X] bug report -> please search issues before submitting - [ ] feature request Area - [X] devkit - [ ] schematics Versions `-- @angular/cli@1.6.4 `-...
X Description: Bug Report or Feature Request (mark with an x) - [X] bug report -> please search issues before submitting - [ ] feature request Area - [X] devkit - [ ] schematics Versions `-- @angular/cli@1.6.4...
Opengraph URL: https://github.com/angular/devkit/issues/388
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"build-optimizer: \"logical OR\" property assignment is removed","articleBody":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [X] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Area\r\n```\r\n- [X] devkit\r\n- [ ] schematics\r\n```\r\n\r\n### Versions\r\n\r\n```\r\n`-- @angular/cli@1.6.4\r\n `-- @angular-devkit/build-optimizer@0.0.38\r\n\r\nnode -v // 8.5.0\r\nnpm -v // 5.5.1\r\n```\r\n\r\n\r\n### Repro steps\r\n\r\nClone [this reproduction repository](https://github.com/DevVersion/button-build-optimizer-issue) and run the app in two different ways:\r\n\r\n* With the build optimizer (using `-prod --aot`)\r\n* Without the build optimizer (using `-prod --aot --build-optimizer=false`)\r\n\r\n\u003cimg width=\"974\" alt=\"problemexplanation\" src=\"https://user-images.githubusercontent.com/4987015/34905995-1dccb29a-f864-11e7-9e53-51a8567c1558.PNG\">\r\n\r\nThe 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.\r\n\r\nSwitching to a ternary, or simple if-else will fix the issue. \r\n\r\n\r\n_with build-optimizer disabled_\r\n\r\n\r\n__with build-optimizer enabled_\r\n\r\n\r\n\r\n### Mention any other details that might be useful\r\n\r\nRelated to Angular Material. https://github.com/angular/material2/issues/9360\r\n\r\ncc. @filipesilva ","author":{"url":"https://github.com/devversion","@type":"Person","name":"devversion"},"datePublished":"2018-01-13T12:19:11Z","url":"https://github.com/angular/devkit/issues/388"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e85befbb-45e2-ca99-ab29-5c8560fb5f14 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A43A:2454CC:1375D8E:18B8912:6B012724 |
| html-safe-nonce | 4ceec4b208acf37af63b6adf35e29e31e6d1cd6882a17809e19c9e20dadd6e58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDNBOjI0NTRDQzoxMzc1RDhFOjE4Qjg5MTI6NkIwMTI3MjQiLCJ2aXNpdG9yX2lkIjoiNDAxNTczNjM3MTc1NDUzNDc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 97dd321a0e4a38e549a09a1782de8911eecd11ec36969eef74628e78d1021572 |
| hovercard-subject-tag | issue:288324608 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/devkit/388/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c0411b3473d4001cf828163d64405daa3e60862bdd16efc67bc201782d784617/angular/devkit/issues/388 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c0411b3473d4001cf828163d64405daa3e60862bdd16efc67bc201782d784617/angular/devkit/issues/388 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [X] bug report -> please search issues before submitting - [ ] feature request Area - [X] devkit - [ ] schematics Versions `-- @angular/cli@1.6.4 `-... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devversion |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/devkit git https://github.com/angular/devkit.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 88288940 |
| octolytics-dimension-repository_nwo | angular/devkit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 88288940 |
| octolytics-dimension-repository_network_root_nwo | angular/devkit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width