Skip to content
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

feat(compiler-cli): lower loadChildren #23088

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
5 participants
@alxhub
Copy link
Contributor

commented Mar 30, 2018

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] angular.io application / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[ ] No

Other information

@googlebot googlebot added the cla: yes label Mar 30, 2018

@trotyl

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2018

Closes #21522?

@alxhub alxhub force-pushed the alxhub:lower-loadchildren branch 3 times, most recently from b6a10b4 to 87f54c5 Mar 30, 2018

@vicb

vicb approved these changes Apr 3, 2018

@@ -69,6 +69,7 @@ jasmine_node_test(
"//packages/common:npm_package",
"//packages/core:npm_package",
"//packages/platform-browser:npm_package",
"//packages/router:npm_package",

This comment has been minimized.

Copy link
@alexeagle

alexeagle Apr 3, 2018

Contributor

dosn't seem used

This comment has been minimized.

Copy link
@alxhub

alxhub Apr 3, 2018

Author Contributor

It is used :) see ngc_spec.ts and the test that was added.

@alxhub alxhub force-pushed the alxhub:lower-loadchildren branch from 87f54c5 to 7318164 Apr 3, 2018

feat(compiler-cli): lower loadChildren fields to allow dynamic module…
… paths

Computing the value of loadChildren does not work externally, as the CLI
needs to be able to detect the paths referenced to properly set up
codesplitting. However, internally, different approaches to codesplitting
require hashed module IDs, and the computation of those hashes involves
something like:

{path: '...', loadChildren: hashFn('module')}

ngc should lower loadChildren into an exported constant in that case.

This will never break externally, because loadChildren is always a
string externally, and a string won't get lowered.

@alxhub alxhub force-pushed the alxhub:lower-loadchildren branch from 7318164 to 64938b5 Apr 3, 2018

@alxhub alxhub closed this in 550433a Apr 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.