I’m trying PWA for the first time. I’ve overcome the first problem of precacheing my lazy loaded modules by putting
IonicModule.forRoot(MyApp, { preloadModules: true})
in the app/module.ts, but I can’t seem to find out how to do the same with all the images and other static assets.
There’s a line in service-worker.js:-
self.toolbox.precache( [ [
'./build/main.js',
'./build/vendor.js',
'./build/main.css',
'./build/polyfills.js',
'index.html',
'manifest.json'
]
);
so I thought it would go there, I tried ‘./assets/img/myimage.png’ and ‘/assets/img/myimage.png’ and ‘assets/img/myimage.png’ and various * too, but nothing gets precached - I’m checking that by looking in the sources of chrome dev tools.
Have I overlooked something trivial here?