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

Commit 7699b33

Browse files
committed
refactor(optimizations): only run optimizations when optimizeJs is true
only run optimizations when optimizeJs is true
1 parent 74701fb commit 7699b33

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/rollup/ionic-rollup-resolver-plugin.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ export function ionicRollupResolverPlugin(context: BuildContext) {
6666
}
6767
}
6868

69+
let jsContent = file.content;
70+
if (context.optimizeJs) {
71+
jsContent = optimizeJavascript(file.path, file.content);
72+
}
73+
6974
return {
70-
code: optimizeJavascript(jsSourcePath, file.content),
75+
code: jsContent,
7176
map: mapContent
7277
};
7378
}

0 commit comments

Comments
 (0)