Title: Production build using buildOptimizer is broke but works without buildOptimizer (Angular v6/v7) · Issue #17255 · angular/angular-cli · GitHub
Open Graph Title: Production build using buildOptimizer is broke but works without buildOptimizer (Angular v6/v7) · Issue #17255 · angular/angular-cli
X Title: Production build using buildOptimizer is broke but works without buildOptimizer (Angular v6/v7) · Issue #17255 · angular/angular-cli
Description: 🐞 bug report Affected Package The issue is caused by package @angular-devkit/build-angular (this is my assumption) Is this a regression? Hard to tell as build-dependencies changed from Angular v5 to Angular v6 / v7, right? Building the o...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular-devkit/build-angular (this is my assumption) Is this a regression? Hard to tell as build-dependencies changed from Angular v5 t...
X Description: 🐞 bug report Affected Package The issue is caused by package @angular-devkit/build-angular (this is my assumption) Is this a regression? Hard to tell as build-dependencies changed from Angular v5 t...
Opengraph URL: https://github.com/angular/angular-cli/issues/17255
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Production build using buildOptimizer is broke but works without buildOptimizer (Angular v6/v7)","articleBody":"# 🐞 bug report\r\n\r\n### Affected Package\r\nThe issue is caused by package `@angular-devkit/build-angular` (this is my assumption)\r\n\r\n\r\n### Is this a regression?\r\n\r\nHard to tell as build-dependencies changed from Angular v5 to Angular v6 / v7, right?\r\nBuilding the original v5 application using `ng build --prod --build-optimizer=true` spit out a working application at least.\r\n\r\n### Description\r\n\r\nBuilding itself works but when trying to launch the application in the browser, an error is logged to the console:\r\n\r\n```\r\nmain.8cc841c62bc65dc4efeb.js:1 Uncaught TypeError: (intermediate value)(intermediate value) is not a function\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.12.../apply (main.8cc841c62bc65dc4efeb.js:1)\r\n at i (main.8cc841c62bc65dc4efeb.js:1)\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.32../lib/Promise (main.8cc841c62bc65dc4efeb.js:1)\r\n at i (main.8cc841c62bc65dc4efeb.js:1)\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.1.../callbacks (main.8cc841c62bc65dc4efeb.js:1)\r\n```\r\n\r\nWhen setting `buildOptimizer` to `false`, everything works out as expected (no error is logged and application launches).\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nCheck out https://github.com/ClemensSchneider/angular-buildoptimizer-bug/tree/angular7 (or https://github.com/ClemensSchneider/angular-buildoptimizer-bug/tree/angular6 for the Angular v6 version).\r\n\r\nRun `yarn` to install dependencies, then run `yarn build` to build the production build with `buildOptimizer` enabled.\r\nServe the resulting artifacts in `dist/build-optimizer-bug` with a regular http-server and open the application in the browser. You can see, that it errors out without displaying anything.\r\n\r\nThen, turn off `buildOptimizer` in `angular.json` and run `yarn build` again. Open the resulting artifacts in the browser again and see, that everything works as expected.\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>\u003ccode>\r\nmain.8cc841c62bc65dc4efeb.js:1 Uncaught TypeError: (intermediate value)(intermediate value) is not a function\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.12.../apply (main.8cc841c62bc65dc4efeb.js:1)\r\n at i (main.8cc841c62bc65dc4efeb.js:1)\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.32../lib/Promise (main.8cc841c62bc65dc4efeb.js:1)\r\n at i (main.8cc841c62bc65dc4efeb.js:1)\r\n at main.8cc841c62bc65dc4efeb.js:1\r\n at Object.RCq4.e.exports.1.../callbacks (main.8cc841c62bc65dc4efeb.js:1)\r\n\u003c/code>\u003c/pre>\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version (v7):**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 7.2.1\r\nNode: 8.11.1\r\nOS: win32 x64\r\nAngular: 7.2.0\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.12.1\r\n@angular-devkit/build-angular 0.12.1\r\n@angular-devkit/build-optimizer 0.12.1\r\n@angular-devkit/build-webpack 0.12.1\r\n@angular-devkit/core 7.2.1\r\n@angular-devkit/schematics 7.2.1\r\n@angular/cli 7.2.1\r\n@ngtools/webpack 7.2.1\r\n@schematics/angular 7.2.1\r\n@schematics/update 0.12.1\r\nrxjs 6.3.3\r\ntypescript 3.2.2\r\nwebpack 4.23.1\r\n\u003c/code>\u003c/pre>\r\n\r\n**Angular Version (v6):**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 6.2.9\r\nNode: 8.11.1\r\nOS: win32 x64\r\nAngular: 6.1.10\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.8.9\r\n@angular-devkit/build-angular 0.8.9\r\n@angular-devkit/build-optimizer 0.8.9\r\n@angular-devkit/build-webpack 0.8.9\r\n@angular-devkit/core 0.8.9\r\n@angular-devkit/schematics 0.8.9\r\n@angular/cli 6.2.9\r\n@ngtools/webpack 6.2.9\r\n@schematics/angular 0.8.9\r\n@schematics/update 0.8.9\r\nrxjs 6.2.2\r\ntypescript 2.9.2\r\nwebpack 4.16.4\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->\r\nThe module on which the build optimization chokes is https://www.npmjs.com/package/autobahn\r\n","author":{"url":"https://github.com/ClemensSchneider","@type":"Person","name":"ClemensSchneider"},"datePublished":"2019-01-16T11:09:44Z","url":"https://github.com/angular/angular-cli/issues/17255"}
| 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:4d7bb33e-ce1d-e991-7778-d10b53048177 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 80AE:3C21B:17EFDF3:1E9FCD7:6B012EFE |
| html-safe-nonce | 92e80a756bdb70e31a1a264c4e7ebd84db675b9870aa80599ecf8e414df1f44c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEFFOjNDMjFCOjE3RUZERjM6MUU5RkNENzo2QjAxMkVGRSIsInZpc2l0b3JfaWQiOiI3Mjg3OTI0OTA4ODA0MzUzNzkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d34d205ab11031cf2d6d36109c928cfccffa05ffac00ebb05f996d736944861f |
| hovercard-subject-tag | issue:584519684 |
| 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/angular-cli/17255/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ecfde5b515e97fdc97f62d5d7abc8251fa59ec8012761a002e8388f5cbf2251f/angular/angular-cli/issues/17255 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ecfde5b515e97fdc97f62d5d7abc8251fa59ec8012761a002e8388f5cbf2251f/angular/angular-cli/issues/17255 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular-devkit/build-angular (this is my assumption) Is this a regression? Hard to tell as build-dependencies changed from Angular v5 t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ClemensSchneider |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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