How to use RequireJS build profile + r.js in a multi-page project

后端 未结 2 974
长情又很酷
长情又很酷 2020-12-04 06:21

I am currently learning RequireJS fundamentals and have some questions regarding a build profile, main files, and use of RequireJS with multi-page projects.

My proje

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 07:11

    
    
    
    // file: js/main
    
    require(['./global.config'], function(){
        require(['./view/home'], function() {
            // do something
        });
    });
    

    This is what I used in my project.

提交回复
热议问题