fix(ngcc): ensure that more dependencies are found by EsmDependencyHost
(#37075)
Previously this host was skipping files if they had imports that spanned multiple lines, or if the import was a dynamic import expression. PR Close #37075
This commit is contained in:

committed by
atscott

parent
819982ea20
commit
c6872c02d8
@ -93,7 +93,7 @@ export class EsmDependencyHost extends DependencyHostBase {
|
||||
* in this file, true otherwise.
|
||||
*/
|
||||
export function hasImportOrReexportStatements(source: string): boolean {
|
||||
return /(import|export)\s.+from/.test(source);
|
||||
return /(?:import|export)[\s\S]+?(["'])(?:(?:\\\1|.)*?)\1/.test(source);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user