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(aio): add support for faster, unoptimized serve
#23569
Conversation
When running `yarn start` and `yarn serve-and-sync`, we are usually more interested in faster re-build times than optimized builds. This was also the behavior, before upgrading to @angular/cli@6 (fc5af69). This commit introduces a new configuration (`fast`), which is used by `yarn start` and `yarn serve-and-sync` to restore the faster, unoptimized builds. Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using slower, optimized builds).
You can preview 3915d69 at https://pr23569-3915d69.ngbuilds.io/. |
I was wondering about this - it seems that we no longer have the capability in cli to have a matrix of environment vs configuration - I'm not sure if this was intentional but it seems like step backwards in terms of flexibility. @hansl @filipesilva can you provide some insights? are we missing anything? |
When running `yarn start` and `yarn serve-and-sync`, we are usually more interested in faster re-build times than optimized builds. This was also the behavior, before upgrading to @angular/cli@6 (fc5af69). This commit introduces a new configuration (`fast`), which is used by `yarn start` and `yarn serve-and-sync` to restore the faster, unoptimized builds. Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using slower, optimized builds). PR Close #23569
@IgorMinar environments in 1.7 was only about file replacement, while target was optimization level. Now that all flags are part of the build configuration, they’ve been replaced by configurations for both (and you can use values on the command line, like —optimization=true instead of —target=prod). It seems to me that your default options should be non optimized and use a different configuration for different levels of optimization. |
I see two problems:
|
1. We are thinking of adding extends as a keyword to entend targets and configurations, so that would solve it.
2. Serve has some more options now, including optimization and aot. It overrides the browser target option.
Hope this helps!
…On Apr 27, 2018, 08:19 -0700, George Kalpakas ***@***.***>, wrote:
I see two problems:
1. > It is not possible to share a configuration (that is different than the default) with several environments. For example, we hav three different production environments: stable (for the currently stable version; e.g. 5.x), next (for the @next version; e.g. 6.x/master), and archive (for older versions; 3.x, 4.x, etc.). We could repeat the options in each one, but this is tedious and can easily get out-of-sync.
2. > AFAICT, the flags only apply to build, not other commands, such as serve. So, if we want to be able to serve optimized/unoptimized versions for different purposes, we need to have two different configurations.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Great to hear. Extending would be awesome indeed. Thx! |
When running `yarn start` and `yarn serve-and-sync`, we are usually more interested in faster re-build times than optimized builds. This was also the behavior, before upgrading to @angular/cli@6 (fc5af69). This commit introduces a new configuration (`fast`), which is used by `yarn start` and `yarn serve-and-sync` to restore the faster, unoptimized builds. Other commands, such as `ng serve` and `ng e2e`, remain unchanged (using slower, optimized builds). PR Close #23569
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. |
PR Checklist
Tests for the changes have been added (for bug fixes / features)Docs have been added / updated (for bug fixes / features)PR Type
What kind of change does this PR introduce?
What is the current behavior?
When running
yarn start
andyarn serve-and-sync
, we are usually more interested in faster re-build times than optimized builds. This was also the behavior, before upgrading to @angular/cli@6 (fc5af69).What is the new behavior?
This commit introduces a new configuration (
fast
), which is used byyarn start
andyarn serve-and-sync
to restore the faster, unoptimized builds.Other commands, such as
ng serve
andng e2e
, remain unchanged (using slower, optimized builds).Does this PR introduce a breaking change?