AMD-cache
AMD-cache copied to clipboard
How can I use this component in `require.config`?
How can I use this component in require.config?
My config is like this:
require.config({
baseUrl: '../libs/',
paths: {
api: ['api'],
jquery: ['jquery.min'],
zepto: ['zepto.min'],
cache:['cache']
}
});
I want to cache api jquery zepto,how can i do that?
@MichaelGong You don't define caching in the config; you have to do it in the respective require call. An example based on your config:
require(['cache!api'], function(api){
api.doSomething();
});