Title: localized components containing i18n tags will produce identical chunk hashes when building with --localize · Issue #17416 · angular/angular-cli · GitHub
Open Graph Title: localized components containing i18n tags will produce identical chunk hashes when building with --localize · Issue #17416 · angular/angular-cli
X Title: localized components containing i18n tags will produce identical chunk hashes when building with --localize · Issue #17416 · angular/angular-cli
Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Description I have an application that is being translated in several (21 at the moment) languages using the Angula...
Open Graph Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Description I have an application that is being translated in several (21 a...
X Description: 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Description I have an application that is being translated in several (21 a...
Opengraph URL: https://github.com/angular/angular-cli/issues/17416
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"localized components containing i18n tags will produce identical chunk hashes when building with --localize","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 Bug report\r\n\r\n### Command (mark with an `x`)\r\n\r\n- [ ] new\r\n- [x] build\r\n- [ ] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] xi18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [ ] doc\r\n\r\n\r\n### Description\r\nI have an application that is being translated in several (21 at the moment) languages using the Angular i18n mechanism. I'm compiling the app AOT, therefore I need a separate build for each locale. To achieve this I setup my Azure pipeline to build the app using multiple agents in parallel, one for each locale, and it works like a charm. However, this is very resource-consuming, so I'm updating to Angular 9 in order to use the `--localize` option, which perfectly fits my needs.\r\nAfter the update I can build the app once and translate it to all languages in a few seconds, which is amazing.\r\nI am now facing this issue: when I build my application for all locales, the resulting chunk hashes are identical. As a result, browser cache is not invalidated and files are not re-requested, so the app is not translated.\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n- clone this [repo](https://github.com/nas90/i18n-hash-issue)\r\n- run `npm install`\r\n- run `ng build --localize`\r\n- check the dist folder: file content for `main.js` is different for each locale (template text is translated), while the hashes are the same\r\n\r\n\r\n## 🌍 Your Environment\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 9.1.0\r\nNode: 10.19.0\r\nOS: win32 x64\r\n\r\nAngular: 9.1.0\r\n... animations, cli, common, compiler, compiler-cli, core, forms\r\n... language-service, localize, platform-browser\r\n... platform-browser-dynamic, router\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.901.0\r\n@angular-devkit/build-angular 0.901.0\r\n@angular-devkit/build-optimizer 0.901.0\r\n@angular-devkit/build-webpack 0.901.0\r\n@angular-devkit/core 9.1.0\r\n@angular-devkit/schematics 9.1.0\r\n@ngtools/webpack 9.1.0\r\n@schematics/angular 9.1.0\r\n@schematics/update 0.901.0\r\nrxjs 6.5.5\r\ntypescript 3.8.3\r\nwebpack 4.42.0\r\n\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\nIn my scenario, the user language preference is stored in the cookies, and a shell app serves the corresponding folder. I can't add the locale to the URL.\r\nTherefore in my `angular.json` I set `baseHref=\"/\"` for all locales.\r\n\r\nI am aware of this [issue](https://github.com/angular/angular-cli/issues/16526) and the [PR](https://github.com/angular/angular-cli/pull/16817) mentioned there, however the issue is still not resolved.\r\n","author":{"url":"https://github.com/nas90","@type":"Person","name":"nas90"},"datePublished":"2020-04-07T15:32:23Z","url":"https://github.com/angular/angular-cli/issues/17416"}
| 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:3dc1776c-595e-ea77-1dfd-4bcb5e2e11a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4DC:11EACE:10270A6:1595F1C:6B01131C |
| html-safe-nonce | 1b1367d2c86423885172368dc35d60c51b5097e7ba7e78a5185d6ec51dc20d8b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNERDOjExRUFDRToxMDI3MEE2OjE1OTVGMUM6NkIwMTEzMUMiLCJ2aXNpdG9yX2lkIjoiNzU3OTI4NTU5MDI2NTM2OTM3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 04d086b080af9b4ac7dae242e2b0a2d3210fdca902581fac669c4fb26c407623 |
| hovercard-subject-tag | issue:595958468 |
| 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/17416/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93f565d8cb94a979d8c6731dc91c324ea3f15a7c2be1d0aa8d6f948054a255fe/angular/angular-cli/issues/17416 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93f565d8cb94a979d8c6731dc91c324ea3f15a7c2be1d0aa8d6f948054a255fe/angular/angular-cli/issues/17416 |
| og:image:alt | 🐞 Bug report Command (mark with an x) new build serve test e2e generate add update lint xi18n run config help version doc Description I have an application that is being translated in several (21 a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nas90 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width