-
Notifications
You must be signed in to change notification settings - Fork 12k
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
fix(AoTPlugin): don't override context module deps #4153
Conversation
}) | ||
// Check for AoT and lazy routes. | ||
.then(() => ng('build', '--aot')) | ||
.then(() => readdirSync('dist').length) | ||
.then(currentNumberOfDistFiles => { | ||
if (oldNumberOfFiles >= currentNumberOfDistFiles) { | ||
if (oldNumberOfFiles != currentNumberOfDistFiles) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old number of files should be smaller, so I think this change is unneeded (and can lead to errors)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now update the number: oldNumberOfFiles = currentNumberOfDistFiles;
.
result.resolveDependencies = createResolveDependenciesFromContextMap( | ||
(_: any, cb: any) => cb(null, this._lazyRoutes)); | ||
|
||
// there is no way to find the original request, so try to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use a special property set by the function above, that should work, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, tried that. It's a whole new object with just a few props picked. Tried a bunch of stuff even. Also checked with @TheLarkInn, he didn't know of a way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Clydins approach does away with this entirely, and makes it possible to always target the right resource.
b284eb9
to
5d84bd6
Compare
5d84bd6
to
9fc3d40
Compare
ac79e5b
to
2b6af24
Compare
sweet, need to wait or the next NPM build to test this? regards |
@born2net after it is accepted, yes. You can also use master if you want. |
tx man appreciate the efforts |
LGTM, looks much better! |
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. |
Thanks to @clydin for a much cleaner solution!
Fix #2496
Fix #3079