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

Commit 49d7970

Browse files
committed
refactor(preprocess): require flags for optimizations and processing deep links
1 parent ad39fa8 commit 49d7970

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/preprocess.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ export function preprocess(context: BuildContext) {
2222
}
2323

2424
function preprocessWorker(context: BuildContext) {
25-
return deepLinking(context)
25+
const deepLinksPromise = getBooleanPropertyValue(Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS) ? deepLinking(context) : Promise.resolve();
26+
return deepLinksPromise
2627
.then(() => {
2728
if (context.optimizeJs) {
2829
return optimization(context, null);
@@ -50,7 +51,8 @@ export function writeFilesToDisk(context: BuildContext) {
5051
}
5152

5253
export function preprocessUpdate(changedFiles: ChangedFile[], context: BuildContext) {
53-
const promises: Promise<any>[] = [];
54-
promises.push(deepLinkingUpdate(changedFiles, context));
55-
return Promise.all(promises);
54+
if (getBooleanPropertyValue(Constants.ENV_EXPERIMENTAL_PARSE_DEEPLINKS)) {
55+
return deepLinkingUpdate(changedFiles, context);
56+
}
57+
return Promise.resolve();
5658
}

0 commit comments

Comments
 (0)