Fix NGC build with Angular 6

This commit is contained in:
Ibby Hadeed 2018-04-09 15:18:30 -04:00
parent d56826f12d
commit bb6342b72a

View File

@ -39,6 +39,17 @@ function transformImports(file: ts.SourceFile, ctx: ts.TransformationContext, ng
ts.createIdentifier('IonicNativePlugin'), ts.createIdentifier('IonicNativePlugin'),
...methods.map(m => ts.createIdentifier(m)) ...methods.map(m => ts.createIdentifier(m))
]; ];
if (ngcBuild) {
importStatement.importClause.namedBindings.elements = importStatement.importClause.namedBindings.elements.map(
binding => {
binding.name = {
text: binding.escapedText
};
return binding;
}
);
}
} }
return file; return file;