Title: Wrong UMD ID's of Angular packages with a dash in name · Issue #35765 · angular/angular · GitHub
Open Graph Title: Wrong UMD ID's of Angular packages with a dash in name · Issue #35765 · angular/angular
X Title: Wrong UMD ID's of Angular packages with a dash in name · Issue #35765 · angular/angular
Description: bug report Affected Package Every angular package with a dash in their names. So far: "@angular/cdk/drag-drop" "@angular/cdk/text-field" "@angular/material/form-field" "@angular/material/button-toggle" "@angular/material/snack-bar" "@ang...
Open Graph Description: bug report Affected Package Every angular package with a dash in their names. So far: "@angular/cdk/drag-drop" "@angular/cdk/text-field" "@angular/material/form-field" "@angular/material/button-tog...
X Description: bug report Affected Package Every angular package with a dash in their names. So far: "@angular/cdk/drag-drop" "@angular/cdk/text-field" "@angular/material/form-field"...
Opengraph URL: https://github.com/angular/angular/issues/35765
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong UMD ID's of Angular packages with a dash in name","articleBody":"# bug report\r\n\r\n### Affected Package\r\nEvery angular package with a dash in their names.\r\nSo far:\r\n- \"@angular/cdk/drag-drop\"\r\n- \"@angular/cdk/text-field\"\r\n- \"@angular/material/form-field\"\r\n- \"@angular/material/button-toggle\"\r\n- \"@angular/material/snack-bar\"\r\n- \"@angular/material/bottom-sheet\"\r\n- \"@angular/material/grid-list\"\r\n- \"@angular/material/progress-bar\"\r\n- \"@angular/material/progress-spinner\"\r\n- \"@angular/material/slide-toggle\"\r\n\r\n### Is this a regression?\r\nAt least it requires a workaround to function.\r\n\r\n### Description\r\n\r\n\u003c!-- ✍️--> A clear and concise description of the problem...\r\n\r\nThese packages are published with a UMD ID by camelCasing their names, for e.g. \u003cbr>\r\n`@angular/cdk/drag-drop` results of other packages looking for `ng.dragDrop` instead of `ng.material['drag-drop']`.\r\n\r\nWhen providing the UMD bundles of these packages by bundling them with ng-packagr, this leads to unexpected behaviour, since ng-packagr will provide them globally with leaving their dashes in their names (like `ng.material['drag-drop']`). But since other packages of the angular framework are looking for the camelCase version, some manual work has to be done to make this function.\r\n\r\nSo far, I make use of the `umdModuleIds` property of the [ng-packagr.schema.json](https://github.com/ng-packagr/ng-packagr/blob/master/src/ng-package.schema.json#L57) to make this work, so my config looks like this:\r\n```\r\n\"umdModuleIds\": {\r\n\t\"@angular/cdk/drag-drop\": \"ng.cdk.dragDrop\",\r\n\t\"@angular/cdk/text-field\": \"ng.cdk.textField\",\r\n\t\"@angular/material/form-field\": \"ng.material.formField\",\r\n\t\"@angular/material/button-toggle\": \"ng.material.buttonToggle\",\r\n\t\"@angular/material/snack-bar\": \"ng.material.snackBar\",\r\n\t\"@angular/material/bottom-sheet\": \"ng.material.bottomSheet\",\r\n\t\"@angular/material/grid-list\": \"ng.material.gridList\",\r\n\t\"@angular/material/progress-bar\": \"ng.material.progressBar\",\r\n\t\"@angular/material/progress-spinner\": \"ng.material.progressSpinner\",\r\n\t\"@angular/material/slide-toggle\": \"ng.material.slideToggle\"\r\n}\r\n```\r\nso the other packages will find the according UMD ID's\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\r\nJust have a look in the according released npm packages...\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:** Latest Greatest (stable)\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.0.3\r\nNode: 12.16.1\r\nOS: linux x64\r\n\r\nAngular: 9.0.3\r\n... animations, cli, common, compiler, compiler-cli, core\r\n... elements, forms, platform-browser\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect 0.900.3\r\n@angular-devkit/build-angular 0.900.3\r\n@angular-devkit/build-ng-packagr 0.900.3\r\n@angular-devkit/build-optimizer 0.900.3\r\n@angular-devkit/build-webpack 0.900.3\r\n@angular-devkit/core 9.0.3\r\n@angular-devkit/schematics 9.0.3\r\n@angular-devkit/schematics-cli 0.900.4\r\n@angular/cdk 9.1.0\r\n@angular/material 9.1.0\r\n@ngtools/webpack 9.0.3\r\n@schematics/angular 9.0.3\r\n@schematics/schematics 0.900.4\r\n@schematics/update 0.900.3\r\nng-packagr 9.0.2\r\nrxjs 6.5.3\r\ntypescript 3.7.4\r\nwebpack 4.41.2\r\n\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\n\r\nIt would be nice if a unified approach can be taken. Either camelCase everywhere, or kebab-case everywhere\r\n\r\ncheers\r\nflash :zap:\r\n","author":{"url":"https://github.com/flash-me","@type":"Person","name":"flash-me"},"datePublished":"2020-02-28T18:22:43Z","url":"https://github.com/angular/angular/issues/35765"}
| 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:1bfad41f-6525-377f-b8aa-e8c934a359c8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A53C:2652DC:1A2D4C0:216C3C7:6B013934 |
| html-safe-nonce | 182448785b13881159b152ba2eaa3ed2802f1a0037abed9cec6491cc8daccdd7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTNDOjI2NTJEQzoxQTJENEMwOjIxNkMzQzc6NkIwMTM5MzQiLCJ2aXNpdG9yX2lkIjoiODIzMDg1ODkwODE4OTY2OTY4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 29d8061ea8361fee249e7dd40796b7ef720e5fac91556be851a2bd5571ae2bd0 |
| hovercard-subject-tag | issue:572925315 |
| 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/35765/issue_layout |
| twitter:image | https://opengraph.githubassets.com/60cd884f0bb6f84f3ffbe75e1920b994bf7941d185678c60b21c2bc19d09cf8a/angular/angular/issues/35765 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/60cd884f0bb6f84f3ffbe75e1920b994bf7941d185678c60b21c2bc19d09cf8a/angular/angular/issues/35765 |
| og:image:alt | bug report Affected Package Every angular package with a dash in their names. So far: "@angular/cdk/drag-drop" "@angular/cdk/text-field" "@angular/material/form-field" "@angular/material/button-tog... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | flash-me |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| 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