Skip to content

Instantly share code, notes, and snippets.

View pacellyjcax's full-sized avatar

Pacelly Berto pacellyjcax

View GitHub Profile
@webmaxru
webmaxru / ngsw-config.json
Created November 4, 2017 10:13
Adding external resources to app shell
{
...
"assetGroups": [
...
{
"name": "fonts",
"resources": {
"urls": [
"https://fonts.googleapis.com/**",
"https://fonts.gstatic.com/**"
@webmaxru
webmaxru / package.json
Created November 4, 2017 00:06
Emulate Angular 1.6 NGSW build support
{
...
"scripts": {
...
"ngsw-config": "node_modules/.bin/ngsw-config dist src/ngsw-config.json",
"ngsw-copy": "cp node_modules/@angular/service-worker/ngsw-worker.js dist/",
"build-prod-ngsw": "ng build --prod && npm run ngsw-config && npm run ngsw-copy",
"serve-prod-ngsw": "npm run build-prod-ngsw && http-server dist -p 8080"
}
}
@webmaxru
webmaxru / ngsw-config.json
Created October 26, 2017 14:58
Default ngsw-config.json generated by Angular CLI
{
"index": "/index.html",
"assetGroups": [{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html"
],