@@ -14,7 +14,7 @@ import {
14
14
15
15
import { Logger } from '../logger/logger' ;
16
16
import * as Constants from '../util/constants' ;
17
- import { getStringPropertyValue , isIonicOrAngular , isSrcOrIonicOrIonicDeps } from '../util/helpers' ;
17
+ import { getStringPropertyValue , isIonic , isSrcOrIonicOrIonicDeps } from '../util/helpers' ;
18
18
import { MagicString } from '../util/interfaces' ;
19
19
import { findNodes , getTypescriptSourceFile } from '../util/typescript-utils' ;
20
20
@@ -133,9 +133,7 @@ export function purgeStaticFieldDecorators(filePath: string, originalFileContent
133
133
export function purgeStaticCtorFields ( filePath : string , originalFileContent : string , magicString : MagicString ) {
134
134
// TODO - we could extend this to other libs and stuff too such as material 2, but that doesn't seem
135
135
// 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 ) ) {
139
137
Logger . debug ( `[decorators] purgeStaticCtorFields: processing ${ filePath } ...` ) ;
140
138
const typescriptFile = getTypescriptSourceFile ( filePath , originalFileContent ) ;
141
139
const expressionStatements = findNodes ( typescriptFile , typescriptFile , SyntaxKind . ExpressionStatement , false ) as ExpressionStatement [ ] ;
0 commit comments