Managing JavaScript complexity in a large project

前端 未结 2 1674
孤街浪徒
孤街浪徒 2021-02-09 23:30

What should I use to manage growing number of JavaScript files in my application?

We are building a django application with several apps. Each app has different function

2条回答
  •  孤独总比滥情好
    2021-02-10 00:10

    Typically, grouping libraries by commonality (like your second example) would be preferred. However, more importantly would be making sure you have namespaced or otherwise make them unique so that you are unlikely to get naming collisions with other potential scripts.

提交回复
热议问题