[EsBuild] locale changed from "en" to "en-US" on server side (ng serve)
Command
serve
Is this a regression?
- [ ] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
In Angular 18, when I run ng serve with ssr true, the LOCALE_ID is 'en-US' server side, 'en' client side. ("sourceLocale": "en" and "localize": ["en"]).
May be related to https://github.com/angular/angular-cli/issues/26409
Minimal Reproduction
Start an angular app with i18n, "sourceLocale": "en", "localize": ["en"] or "localize": false, ssr: true, ng serve. Inspect LOCALE_ID.
Exception or Error
No response
Your Environment
Angular CLI: 18.0.0-next.5
Node: 20.11.1
Package Manager: yarn 1.22.21
OS: win32 x64
Angular: 18.0.0-next.6
... animations, cdk, common, compiler, compiler-cli, core, forms
... google-maps, language-service, localize, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.1800.0-next.5
@angular-devkit/build-angular 18.0.0-next.5
@angular-devkit/build-optimizer 0.1302.1
@angular-devkit/core 18.0.0-next.5
@angular-devkit/schematics 17.1.2
@angular/cli 18.0.0-next.5
@angular/material 18.0.0-next.5
@angular/ssr 18.0.0-next.5
@schematics/angular 18.0.0-next.5
rxjs 7.8.1
typescript 5.4.5
zone.js 0.14.4
Anything else relevant?
No response
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
I tried the repro-app, but it work correctly. Basically the difference is here: My app, (It comes form Angular 4, so I have app.module and polifylls.ts, not the app.config.ts )
repro app
@manzonif, unfortunately without a reproduction it's impossible for us to investigate and solve the problem.
@alan-agius4 Thanks for the reply. In the end, I opted to migrate the application to standalone, and now it works fine.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.