@@ -14,7 +14,7 @@ import {
1414
1515import { Logger } from '../logger/logger' ;
1616import * as Constants from '../util/constants' ;
17- import { getStringPropertyValue , isIonicOrAngular , isSrcOrIonicOrIonicDeps } from '../util/helpers' ;
17+ import { getStringPropertyValue , isIonic , isSrcOrIonicOrIonicDeps } from '../util/helpers' ;
1818import { MagicString } from '../util/interfaces' ;
1919import { findNodes , getTypescriptSourceFile } from '../util/typescript-utils' ;
2020
@@ -133,9 +133,7 @@ export function purgeStaticFieldDecorators(filePath: string, originalFileContent
133133export function purgeStaticCtorFields ( filePath : string , originalFileContent : string , magicString : MagicString ) {
134134 // TODO - we could extend this to other libs and stuff too such as material 2, but that doesn't seem
135135 // particularly maintainable
136- if ( isIonicOrAngular ( filePath ) && ! isIonicEntryComponent ( filePath )
137- && ! filePath . includes ( '@angular/platform-browser' )
138- && ! filePath . includes ( '@angular/core' ) ) {
136+ if ( isIonic ( filePath ) && ! isIonicEntryComponent ( filePath ) ) {
139137 Logger . debug ( `[decorators] purgeStaticCtorFields: processing ${ filePath } ...` ) ;
140138 const typescriptFile = getTypescriptSourceFile ( filePath , originalFileContent ) ;
141139 const expressionStatements = findNodes ( typescriptFile , typescriptFile , SyntaxKind . ExpressionStatement , false ) as ExpressionStatement [ ] ;
0 commit comments