Skip to content

Introduce different levels for the optimization build option聽#15761

Closed as not planned
Closed as not planned

Description

@filipesilva

馃殌 Feature request

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description

Introduce different levels for the optimization build option.

Describe the solution you'd like

We should have a way to disable unsafe optimizations, such as pure_getters.

Describe alternatives you've considered

Either having several levels (e.g. true > 'safe-only' > false) or having a per-option switch on a object.

Related issues:
#14187
#14287
#14316
#15607
#15751
#17255
#17494

Activity

  1. modified the milestone: Backlog on Oct 4, 2019
  2. cloakedninjas commented on Dec 2, 2019

    @cloakedninjas

    Also related: #11439

  3. dgp1130 commented on Jun 4, 2020

    @dgp1130
    Collaborator

    Terser discussion of working around pure_getters: terser/terser#464

  4. laurentgoudet commented on Jun 15, 2020

    @laurentgoudet

    Originally posted by @alan-agius4 in #17517 (comment)

    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).

  5. angular-robot commented on May 5, 2022

    @angular-robot
    Contributor

    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.

  6. modified the milestones: Backlog, needsTriage on May 5, 2022
  7. angular-robot commented on May 24, 2022

    @angular-robot
    Contributor

    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.

  8. added
    feature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors
    and removed
    feature: votes requiredFeature request which is currently still in the voting phase
    on May 24, 2022
  9. alan-agius4 commented on Jan 9, 2025

    @alan-agius4
    Collaborator

    Closing as this is currently not planned.

  10. angular-automatic-lock-bot commented on Feb 9, 2025

    @angular-automatic-lock-bot

    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.

  11. locked and limited conversation to collaborators on Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular-devkit/build-angularfeatureLabel used to distinguish feature request from other issuesfeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authors

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions