Title: $localize runtime error with special .browserslistrc file · Issue #48194 · angular/angular · GitHub
Open Graph Title: $localize runtime error with special .browserslistrc file · Issue #48194 · angular/angular
X Title: $localize runtime error with special .browserslistrc file · Issue #48194 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? localize Is this a regression? Yes Description Since Angular 15, targeting last 5 iOS major versions using .browserslistrc file breaks the generated bundle, throwing TypeError: $loca...
Open Graph Description: Which @angular/* package(s) are the source of the bug? localize Is this a regression? Yes Description Since Angular 15, targeting last 5 iOS major versions using .browserslistrc file breaks the gen...
X Description: Which @angular/* package(s) are the source of the bug? localize Is this a regression? Yes Description Since Angular 15, targeting last 5 iOS major versions using .browserslistrc file breaks the gen...
Opengraph URL: https://github.com/angular/angular/issues/48194
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"$localize runtime error with special .browserslistrc file","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nlocalize\n\n### Is this a regression?\n\nYes\n\n### Description\n\nSince Angular 15, targeting last 5 iOS major versions using `.browserslistrc` file breaks the generated bundle, throwing `TypeError: $localize is not a function` on runtime.\r\nJust changing `.browserslistrc` to `last 4 iOS major versions` generates valid bundles again.\r\n\r\nTo reproduce, follow this steps:\r\n\r\n\u003e ng new\r\n\u003e ng add @angular/localize\r\n\r\nThen update `.browserslistrc` with this content: `last 5 iOS major versions`\r\n\r\nAdd `\"localize\": true` in your `angular.json` file, under projects \u003e _yourProject_ \u003e architect \u003e build \u003e options.\r\n\r\nAdd an `i18n` attribute to some HTML element to enable localization.\r\n\r\nAnd then: \r\n\u003e ng serve\n\n### Please provide a link to a minimal reproduction of the bug\n\nI haven't been able to reproduce on StackBlitz, it's ignoring my angular.json file\n\n### Please provide the exception or error you saw\n\n```true\nTypeError: $localize is not a function\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 15.0.0\r\nNode: 18.12.1\r\nPackage Manager: npm 9.1.2\r\nOS: win32 x64\r\n\r\nAngular: 15.0.0\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... localize, platform-browser, platform-browser-dynamic, router\r\n\r\nPackage Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect 0.1500.0\r\n@angular-devkit/build-angular 15.0.0\r\n@angular-devkit/core 15.0.0\r\n@angular-devkit/schematics 15.0.0\r\n@schematics/angular 15.0.0\r\nrxjs 7.5.7\r\ntypescript 4.8.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/javiermarinros","@type":"Person","name":"javiermarinros"},"datePublished":"2022-11-21T09:23:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/48194/angular/issues/48194"}
| 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:c7ba6c01-5c39-bc1b-abc0-450257f0c661 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D16C:2A6262:284A81C:34036D9:6974C7A7 |
| html-safe-nonce | 62a96db77be8c749f82f5fbaf05e53d42a9e3dab09062ae2a7187fa5968276ba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTZDOjJBNjI2MjoyODRBODFDOjM0MDM2RDk6Njk3NEM3QTciLCJ2aXNpdG9yX2lkIjoiNTU1NzEzNzE2Njc3MDE2MTU3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 29677a6a96ae1f2bef7b1753b15db62f09b935b41dfa90ecc55f238044e9a22e |
| hovercard-subject-tag | issue:1461507321 |
| 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/48194/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5ff4d93706a8b160ff4b8cb20945c732fb8912295971e0cb092d2949c225b3db/angular/angular/issues/48194 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5ff4d93706a8b160ff4b8cb20945c732fb8912295971e0cb092d2949c225b3db/angular/angular/issues/48194 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? localize Is this a regression? Yes Description Since Angular 15, targeting last 5 iOS major versions using .browserslistrc file breaks the gen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | javiermarinros |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width