Javascript add js libraries by code

后端 未结 3 1348
暖寄归人
暖寄归人 2020-12-22 08:20

I\'m trying to split my long JavaScript code into different libraries.

I\'m trying to write a wrapper script that will load all my libraries:

//this          


        
3条回答
  •  清酒与你
    2020-12-22 08:52

    What you are looking for is called "Dependency Management". There are several solutions out there for this problem.

    One big one is RequireJS: http://requirejs.org/docs/start.html

    See also:

    • JavaScript dependency management
    • Autoloading Javascript

提交回复
热议问题