Question

I attempted to find an answer to my question with the search engine but I was unable to. I'm using jssor slider in my backbone project with require.js. Anyone can tell what deps and exports of Jssor slider should I configure in shim: {} of main.js

That is that I tried but didn't work :

 "jssor" : {
        exports : "Jssor"
 }
Était-ce utile?

La solution

Not tried yet, what about the following idea?

<script type="text/javascript">
    require.config({
        paths: {
            //path of jssor slider.mini.js
            "jssor": '/jssor.slider.mini.js'
        },
        shim: {
            'jssor': {
                exports: '$JssorSlider$'
            }
        }
    });
</script>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top