Skip to content

Commit 69a993b

Browse files
alxhubhansl
authored andcommitted
fix(@schematics/angular): add ServiceWorkerModule in dev mode, but disabled
1 parent a488e65 commit 69a993b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schematics/angular/application/other-files/app.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { environment } from '../environments/environment';<% } %>
1515
imports: [
1616
BrowserModule<% if (routing) { %>,
1717
AppRoutingModule<% } %><% if (serviceWorker) { %>,
18-
environment.production ? ServiceWorkerModule.register('/ngsw-worker.js') : []<% } %>
18+
ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production })<% } %>
1919
],
2020
providers: [],
2121
bootstrap: [AppComponent]

0 commit comments

Comments
 (0)