We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a627b4 commit e7f5488Copy full SHA for e7f5488
packages/schematics/angular/migrations/update-6/index.ts
@@ -273,6 +273,14 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject {
273
configurationName = environment;
274
}
275
276
+ let swConfig: JsonObject | null = null;
277
+ if (serviceWorker) {
278
+ swConfig = {
279
+ serviceWorker: true,
280
+ ngswConfigPath: '/src/ngsw-config.json',
281
+ };
282
+ }
283
+
284
acc[configurationName] = {
285
...(isProduction
286
? {
@@ -288,7 +296,7 @@ function extractProjectsConfig(config: CliConfig, tree: Tree): JsonObject {
288
296
289
297
: {}
290
298
),
291
- ...(isProduction && serviceWorker ? { serviceWorker: true } : {}),
299
+ ...(isProduction && swConfig ? swConfig : {}),
292
300
fileReplacements: [
293
301
{
294
302
replace: `${app.root}/${source}`,
0 commit comments