문제

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?

도움이 되었습니까?

해결책

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"
  }
  ...
})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top