Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/ngtools/webpack/src/ngcc_processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,15 @@ export class NgccProcessor {
*/
private tryResolvePackage(moduleName: string, resolvedFileName: string): string | undefined {
try {
let packageJsonPath = path.resolve(resolvedFileName, '../package.json');
if (existsSync(packageJsonPath)) {
return packageJsonPath;
}

// This is based on the logic in the NGCC compiler
// tslint:disable-next-line:max-line-length
// See: https://github.com/angular/angular/blob/b93c1dffa17e4e6900b3ab1b9e554b6da92be0de/packages/compiler-cli/src/ngcc/src/packages/dependency_host.ts#L85-L121
const packageJsonPath = require.resolve(`${moduleName}/package.json`,
packageJsonPath = require.resolve(`${moduleName}/package.json`,
{
paths: [resolvedFileName],
},
Expand Down
2 changes: 0 additions & 2 deletions tests/legacy-cli/e2e_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ if (argv.ivy) {
// Ivy doesn't support i18n externally at the moment.
.filter(name => !name.includes('tests/i18n/'))
.filter(name => !name.endsWith('tests/build/aot/aot-i18n.ts'))
// We don't have a library consumption story yet for Ivy.
.filter(name => !name.endsWith('tests/generate/library/library-consumption.ts'))
// The additional lazy modules array does not work with Ivy because it's not needed.
.filter(name => !name.endsWith('tests/build/dynamic-import.ts'))
// We don't have a platform-server usage story yet for Ivy.
Expand Down