[x] Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
v18.x
Description
A very specific style in the template of a component triggers an error ERR_CONTENT_LENGTH_MISMATCH in chrome when trying to serve it with SSR. This only happens when trying to serve it with the built prod bundle, and only in Chrome (works fine in Firefox).
Run npm run build and then npm run serve:ssr:<project name>, go to http://localhost:4000/ in Chrome and the page doesn't load, you'll get the error GET http://localhost:4000/ net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK) in the console.
Exception or Error
GET http://localhost:4000/ net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
Command
serve
Is this a regression?
The previous version in which this bug was not present was
v18.x
Description
A very specific style in the template of a component triggers an error
ERR_CONTENT_LENGTH_MISMATCH
in chrome when trying to serve it with SSR. This only happens when trying to serve it with the built prod bundle, and only in Chrome (works fine in Firefox).I narrowed it down to the following style:
Minimal Reproduction
Create a new application with Angular CLI, chose SCSS styles, ennable SSR, use server routing (dev preview) (not sure if it's relevant, but probably).
Go to src/app/app.component.html, replace the content with:
Run
npm run build
and thennpm run serve:ssr:<project name>
, go to http://localhost:4000/ in Chrome and the page doesn't load, you'll get the errorGET http://localhost:4000/ net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)
in the console.Exception or Error
Your Environment
Anything else relevant?
This works fine in Firefox & this only happens when you try to serve the files built with SSR for production.