Question

I cannot find in the documentation any "official" way to steal (stealjs) canJS without loading jquery. The problem is that I'm working with Yii Framework (PHP) and some components need jquery before even i include myapp.js modules, that is i must include jquery before everything. Now when i include myapp.js it also steals canJS that in turn will load jquery again breaking my application (2 instance of jquery running). How can i steal canJS without jquery?

Était-ce utile?

La solution

This probably isn't an ideal solution, but you can create an empty dummy.js file and map jquery's path to that in stealconfig.js:

steal.config({
  ...
  paths: {
    "jquery": "dummy.js"
  }
  ...
})
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top