[SOLVED] Appcache config error

Hello everyone,

Im trying to setup appcache for my meteor mantra react app. Appcache itself seems to work fine but I cant manage to load a config.

I’ve placed Meteor.AppCache.config({onlineOnly: [’/img/’]}); in a special appconfig.js file on client and I get Uncaught TypeError: Cannot read property ‘config’ of undefined .

Then I tried to import {Meteor} from ‘meteor/meteor’ - still the same, then also import {AppCache} from ‘meteor/appcache’. Im running out of solutions here.

Anyone has an idea ?

Did you add the AppCache package?

Yes I had and the package works fine, I only have problem when I add the
config (I have to add in order to exclude static images from cache).

Today’s update : I just removed the config code from the client side and
placed it on the server side and it seems to work fine this way, not
triggering errors anymore.

1 Like

Right, it’s server-side config for AppCache.