Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use this component in require.config? #3

Open
MichaelGong opened this issue Nov 16, 2015 · 1 comment
Open

How can I use this component in require.config? #3

MichaelGong opened this issue Nov 16, 2015 · 1 comment

Comments

@MichaelGong
Copy link

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?

@jensarps
Copy link
Owner

jensarps commented Jan 4, 2016

@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();
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants