Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): resolve lazy route Angular packag…
Browse files Browse the repository at this point in the history
…e from project base

Closes #16219

(cherry picked from commit 316786d)
  • Loading branch information
clydin authored and dgp1130 committed Nov 20, 2019
1 parent 8e09b3e commit 95c5260
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ export class AngularCompilerPlugin {
if (this._discoverLazyRoutes) {
// Add lazy modules to the context module for @angular/core
compiler.hooks.contextModuleFactory.tap('angular-compiler', cmf => {
const angularCorePackagePath = require.resolve('@angular/core/package.json');
const angularCorePackagePath = require.resolve('@angular/core/package.json', {
paths: [this._basePath],
});

// APFv6 does not have single FESM anymore. Instead of verifying if we're pointing to
// FESMs, we resolve the `@angular/core` path and verify that the path for the
Expand Down

0 comments on commit 95c5260

Please sign in to comment.