Missing ngsw-worker.js
corneil opened this issue · 1 comments
corneil commented
I noticed the following in app.module.ts
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
but I couldn't find ngsw-worker.js anywhere not even in dist after ng build
Am I missing something?
puku0x commented
@corneil
Thank you for your comment.
Actually, ngsw-worker.js
is generated when you run ng build
with --prod
option.
$ ng build --prod
chunk {0} runtime-es2015.ef7a46f7fe76c6df1598.js (runtime) 4.21 kB [entry] [rendered]
chunk {1} main-es2015.5bf5c458f3332422b737.js (main) 515 kB [initial] [rendered]
chunk {2} polyfills-es2015.fd917e7c3ed57f282ee5.js (polyfills) 64.3 kB [initial] [rendered]
chunk {3} polyfills-es5-es2015.3aa54d3e5134f5b5b842.js (polyfills-es5) 223 kB [initial] [rendered]
chunk {4} styles.1611e3c9650e8b9f5b1c.css (styles) 314 bytes [initial] [rendered]
chunk {5} 5-es2015.081d8513e9ec1184f892.js () 32.6 kB [rendered]
Date: 2019-09-24T11:46:06.154Z - Hash: 2cf85870ae1613113c12 - Time: 12537ms
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.