Using Require.js without data-main

前端 未结 1 647
挽巷
挽巷 2020-12-23 16:54

Can I use Require.js in development without using the data-main attribute to load in my initial script? ie.

1条回答
  •  时光说笑
    2020-12-23 17:35

    Yep, take a look at the documentation: http://requirejs.org/docs/api.html#config

    You need to call require.config() and set baseUrl. Based on your example:

    
    
    

    0 讨论(0)
提交回复
热议问题