Require.js ignoring baseUrl

后端 未结 2 1314
孤独总比滥情好
孤独总比滥情好 2021-02-06 09:32

OK this is driving me crazy so maybe someone can point me in the right direction...

I\'m using the latest require.js combined with jquery as my module loader. I am using

2条回答
  •  余生分开走
    2021-02-06 10:16

    Your config is being executed in async mode. When first require call is founded, your config is not yet applied. According to documentation:

    when require.js loads it will inject another script tag (with async attribute) for scripts/main.js

    So, just execute your config in sync mode:

    
    
    
    

    More info: Patterns for separating config from the main module

提交回复
热议问题