Skip to content

Conversation

@hansl
Copy link
Contributor

@hansl hansl commented Oct 4, 2017

This flag allows people who know what theyre doing to bundle the
server build together with all dependencies. It should only be
used when the whole rendering process is part of the main.ts
or one of its dependencies.

Fixes #7903

@hansl hansl force-pushed the externals-flag branch 2 times, most recently from 70f0c29 to 51fdccd Compare October 5, 2017 16:47
Brocco
Brocco previously approved these changes Oct 5, 2017
Copy link
Contributor

@Brocco Brocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little nit

type: ['none', 'all'],
default: 'none',
description: 'Which external dependencies to bundle into the module. By default, '
+ 'all of node_modules will be kept as requires.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify that this flag applies only when platform is "server"

This flag allows people who know what theyre doing to bundle the
server build together with all dependencies. It should only be
used when the whole rendering process is part of the main.ts
or one of its dependencies.

Fixes angular#7903.
@hansl hansl merged commit aa02086 into angular:master Oct 5, 2017
@hansl hansl deleted the externals-flag branch October 5, 2017 16:56
@SteveSandersonMS
Copy link

Brilliant - this is much quicker than I expected :) Great work.

@hansl Will you also be tweaking the default config so that it doesn't try to uglify server-side builds? Otherwise it will lead to an error when trying to minify a typical self-contained build. Or will this be a different config option?

@Toxicable
Copy link

@SteveSandersonMS if you use ng build --app 1 --aot --environment=prod --output-hashing=false then it'll do mostly the same build for your sever app but without minification

@SteveSandersonMS
Copy link

@Toxicable Thanks for the suggestion. Unfortunately in 1.5.0 that doesn't seem to be sufficient to avoid build warnings. Have filed a new issue to track that: #8035

filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Oct 19, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this pull request Oct 19, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Easy "ng build" improvements to make "platform":"server" work well on Windows & Visual Studio

5 participants