René's URL Explorer Experiment


Title: Build optimizer breaks third party libraries · Issue #612 · angular/devkit · GitHub

Open Graph Title: Build optimizer breaks third party libraries · Issue #612 · angular/devkit

X Title: Build optimizer breaks third party libraries · Issue #612 · 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 all Repro steps Scaffold a project that uses code (e.g. a third p...

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 all Repro steps Scaffold ...

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 all Repro steps Scaffo...

Opengraph URL: https://github.com/angular/devkit/issues/612

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Build optimizer breaks third party libraries","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### 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\u003c!--\r\nOutput from: `node --version` and `npm --version`.\r\n  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra? High Sierra?)\r\n-->\r\nall\r\n\r\n### Repro steps\r\n - Scaffold a project that uses code (e.g. a third party library) that contains code that cannot be properly \"optimized\" using uglifyjs. E.g. code that uses \"non-pure getters\" like this:\r\n```\r\nlet object = {};\r\nObject.defineProperty(object,\"nonSideEffectFreeGetterBasedMember\", \r\n    {get: function(){ console.log(\"side effect\")}});\r\n\r\n(function () {\r\n  object.nonSideEffectFreeGetterBasedMember;\r\n}());\r\n``` \r\n- Enable the angular build optimizer\r\n- Run the program with the build optimizer enabled and observe that the code does not work as expected anymore, because the non-pure getter has been removed and the side-effect does not happen anymore.\r\n\r\n### The log given by the failure\r\n\u003c!-- Normally this include a stack trace and some more information. -->\r\nn/a\r\n\r\n### Desired functionality\r\n\u003c!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n-->\r\nIt should be possible to either configure the build optimizer and disable possibly logic-breaking optimizations altogether or at least on a per dependency basis. Especially if the third party library is already optimized/minified/preprocessed the danger of breaking things is higher than the benefits of possibly saving a few more bytes.\r\n\r\n### Mention any other details that might be useful\r\n\u003c!-- Please include a link to the repo if this is related to an OSS project. -->\r\nRight now it is an either/or - either the code runs and you can rely on it, or it may be \"optimized\" but broken in some cases. \r\n\r\nThe tool-chain makes it easy to include all kind of packages from third parties via npm, etc. The \"build-optimizer\" cannot dictate how the code of all of these packages needs to be written in order to work with the \"optimization\" step. It's OK to forbid non-pure getters in the angular code base, but not in *any* third party code. Either add an option to only apply safe code transformations for third party code or make this an opt-in. The binary API right now is not sufficient.\r\n","author":{"url":"https://github.com/yGuy","@type":"Person","name":"yGuy"},"datePublished":"2018-04-03T11:56:27Z","url":"https://github.com/angular/devkit/issues/612"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:20f23327-38dc-6400-10b1-5b67e35a7cf5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCA4A:311640:FCE3BA:1420418:6B0111EB
html-safe-nonce4890ec8ed514fc18988d8ce2a2349bd67ae3ab7f9260ee79dd32e3a1d448da50
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTRBOjMxMTY0MDpGQ0UzQkE6MTQyMDQxODo2QjAxMTFFQiIsInZpc2l0b3JfaWQiOiI1MzE2NjkyMjgzMjQ3MTA0NDkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac88d84fe7709966bbe16773f4a3c052b66b3b82ec3c6b9ed8f30e02e68559b463
hovercard-subject-tagissue:310805825
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/devkit/612/issue_layout
twitter:imagehttps://opengraph.githubassets.com/10aec9eb475e2031d4200ed7871f0a957612d9adfd591db7d0507b667f731c91/angular/devkit/issues/612
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/10aec9eb475e2031d4200ed7871f0a957612d9adfd591db7d0507b667f731c91/angular/devkit/issues/612
og:image:altBug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Area - [x] devkit - [ ] schematics Versions all Repro steps Scaffold ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameyGuy
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
turbo-cache-controlno-preview
go-importgithub.com/angular/devkit git https://github.com/angular/devkit.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id88288940
octolytics-dimension-repository_nwoangular/devkit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id88288940
octolytics-dimension-repository_network_root_nwoangular/devkit
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/devkit/issues/612#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fdevkit%2Fissues%2F612
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fdevkit%2Fissues%2F612
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fdevkit
Reloadhttps://github.com/angular/devkit/issues/612
Reloadhttps://github.com/angular/devkit/issues/612
Reloadhttps://github.com/angular/devkit/issues/612
angularhttps://github.com/angular
devkithttps://github.com/angular/devkit
Codehttps://github.com/angular/devkit
Issueshttps://github.com/angular/devkit/issues
Pull requestshttps://github.com/angular/devkit/pulls
Actionshttps://github.com/angular/devkit/actions
Projectshttps://github.com/angular/devkit/projects
Security and qualityhttps://github.com/angular/devkit/security
Insightshttps://github.com/angular/devkit/insights
https://github.com/angular/devkit
Build optimizer breaks third party librarieshttps://github.com/angular/devkit/issues/612#top
https://github.com/yGuy
yGuyhttps://github.com/yGuy
on Apr 3, 2018https://github.com/angular/devkit/issues/612#issue-310805825
https://github.com/seanbright
seanbrighthttps://github.com/seanbright
on May 14, 2018https://github.com/angular/devkit/issues/612#issuecomment-388971732
https://github.com/onsip/SIP.jshttps://github.com/onsip/SIP.js
https://github.com/alexeagle
alexeaglehttps://github.com/alexeagle
on Sep 4, 2018https://github.com/angular/devkit/issues/612#issuecomment-418548846
angular/angular-cli#12128https://github.com/angular/angular-cli/issues/12128
alexeaglehttps://github.com/alexeagle
completedhttps://github.com/angular/devkit/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 4, 2018https://github.com/angular/devkit/issues/612#event-1826549785
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/devkit/issues/612
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/devkit/issues/612
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.