-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build optimization true breaks SSE proxy requests in ng serve #21720
Comments
Does forcing |
Yes, exactly, thank you! I set
and still receive SSE in the app. Not sure how a fix could look like. Compression in general makes sense for optimized styles and scripts. Somehow compression/chunking must be blocked on a per request basis, maybe configurably and defaulting to |
Compression isn't particular useful during development, also in version 13 we disable this completely. I'll open a PR to back-port this. |
Closed via #21723 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🐞 Bug report
Command (mark with an
x
)Is this a regression?
No.
Description
Due to another issue #20864 I accidentally turned on the optimization property
projects.___.architect.build.options.optimization
in angular.json. For reproduction it does not matter if the whole property istrue
or any of the more fine-grained optionsscripts/styles.minify/fonts
istrue
:Besides I use a proxy configuration to get data from the backend:
If above optimization is active the server in dev-mode starts with a big red banner:
The regular rest endpoints work normally with this.
One special endpoint that emit server sent events is failing though. The browser connects and holds the connection but the events are not received by the
EventSource
in the browser anymore. The reason seems to be that activated compression does not work with SSE.I can reproduce the behavior with
curl
when I activate the--compressed
option:I do not know which component/library should handle the issue that compression does not work well with SSE. As a user of angular it took me some hours to pin the problem.
Maybe the same issue from a different project: chimurai/http-proxy-middleware#371
🔬 Minimal Reproduction
projects.mgmt-gui.architect.build.options.optimization
totrue
ng serve
🔥 Exception or Error
No exceptions, not even in debug log of the proxy-config.
🌍 Your Environment
Anything else relevant?
No.
The text was updated successfully, but these errors were encountered: