Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(optimizations): temporarily do not purge ctor params from any of …
Browse files Browse the repository at this point in the history
…angular
  • Loading branch information
danbucholtz committed Apr 14, 2017
1 parent 47d9a39 commit 212146c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/optimization/decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import { Logger } from '../logger/logger';
import * as Constants from '../util/constants';
import { getStringPropertyValue, isIonicOrAngular, isSrcOrIonicOrIonicDeps } from '../util/helpers';
import { getStringPropertyValue, isIonic, isSrcOrIonicOrIonicDeps } from '../util/helpers';
import { MagicString } from '../util/interfaces';
import { findNodes, getTypescriptSourceFile } from '../util/typescript-utils';

Expand Down Expand Up @@ -133,9 +133,7 @@ export function purgeStaticFieldDecorators(filePath: string, originalFileContent
export function purgeStaticCtorFields(filePath: string, originalFileContent: string, magicString: MagicString) {
// TODO - we could extend this to other libs and stuff too such as material 2, but that doesn't seem
// particularly maintainable
if (isIonicOrAngular(filePath) && !isIonicEntryComponent(filePath)
&& !filePath.includes('@angular/platform-browser')
&& !filePath.includes('@angular/core')) {
if (isIonic(filePath) && !isIonicEntryComponent(filePath)) {
Logger.debug(`[decorators] purgeStaticCtorFields: processing ${filePath} ...`);
const typescriptFile = getTypescriptSourceFile(filePath, originalFileContent);
const expressionStatements = findNodes(typescriptFile, typescriptFile, SyntaxKind.ExpressionStatement, false) as ExpressionStatement[];
Expand Down

0 comments on commit 212146c

Please sign in to comment.