Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// transforms.indexHtml,
undefined,
// i18nLocale is used when Ivy is disabled
locale || options.i18nLocale,
localeBaseHref || options.baseHref,
);
} catch (err) {
return finalize(false, mapErrorToMessage(err));
}
}
}
if (!options.watch && options.serviceWorker) {
for (const outputPath of outputPaths.values()) {
try {
await augmentAppWithServiceWorker(
host,
root,
normalize(projectRoot),
normalize(outputPath),
options.baseHref || '/',
options.ngswConfigPath,
);
} catch (err) {
return finalize(false, mapErrorToMessage(err));
}
}
}
}
return finalize(success);
};
return new Observable(obs => {
augmentAppWithServiceWorker(
this.context.host,
root,
projectRoot,
resolve(root, normalize(options.outputPath)),
options.baseHref || '/',
options.ngswConfigPath
).then(
() => {
obs.next({ success: true });
obs.complete();
},
(err) => {
obs.error(err);
}
);
});
return new Observable(obs => {
augmentAppWithServiceWorker(
this.context.host,
root,
projectRoot,
resolve(root, normalize(options.outputPath)),
options.baseHref || '/',
options.ngswConfigPath,
).then(
() => {
obs.next({ success: true });
obs.complete();
},
(err: Error) => {
obs.error(err);
},
);
});