You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce different levels for the optimization build option聽#15761
This was one of the changes in version 9 where server production code is minified, one of the main reasons behind this is to speed up server cold starts and reduce deployment times.
What I suggest is to generate sourcemaps and attach them, which will provide a better debug experience.
This is what I'm doing for Sentry, which works reasonably well (shipping the source maps to Sentry in CI), but I'm also shipping server-side logs to an ELK stack - with minified code those would show meaningless stack traces.
One way around could be to embed the source maps into the prod container & apply those on the error stack traces, but I'd rather not have that kind of logic running on errors, in order to ensure those are properly reported (and not swallowed), plus that'd defeat a bit the goal of reducing deployment times.
Not sure how others have solve these problems as the cold starts time & memory usage are indeed quite large (especially when running a 30+ locales app), but for the moment I'd still be interested by a proper way to turn off server-side code minification (a rollup pass or anything that does not make the code unreadable is fine though).
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Activity
cloakedninjas commentedon Dec 2, 2019
Also related: #11439
dgp1130 commentedon Jun 4, 2020
Terser discussion of working around
pure_getters: terser/terser#464laurentgoudet commentedon Jun 15, 2020
This is what I'm doing for Sentry, which works reasonably well (shipping the source maps to Sentry in CI), but I'm also shipping server-side logs to an ELK stack - with minified code those would show meaningless stack traces.
One way around could be to embed the source maps into the prod container & apply those on the error stack traces, but I'd rather not have that kind of logic running on errors, in order to ensure those are properly reported (and not swallowed), plus that'd defeat a bit the goal of reducing deployment times.
Not sure how others have solve these problems as the cold starts time & memory usage are indeed quite large (especially when running a 30+ locales app), but for the moment I'd still be interested by a proper way to turn off server-side code minification (a rollup pass or anything that does not make the code unreadable is fine though).
angular-robot commentedon May 5, 2022
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
angular-robot commentedon May 24, 2022
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
alan-agius4 commentedon Jan 9, 2025
Closing as this is currently not planned.
angular-automatic-lock-bot commentedon Feb 9, 2025
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.