For example, this project:multilineIn the past, it was enough to simply download the js file and insert < script src=’xxx’></script > into the webpage file, but now … I really don’t know how to do it/Face with tears of joy, ask for advice modestly, thank you
Obviously, the building owner does not understand modularity, and refers to a framework or plug-in through script tags. Most of the time, a global variable, such as jQuery, is mounted under window, and then some methods under jQuery are called. A jQuery is as large as it can be compressed, but not all methods are used in our project. In addition, when we introduce multiple frameworks or libraries, we find that the page is too large, many unused methods are introduced, and some frameworks have common methods. I just want to introduce one, and the results are implemented in multiple plug-ins. What should we do? Then we can disassemble these libraries into small parts and assemble them by ourselves. Granulation is a modular form of expression. Modularization also has many other benefits, such as splitting modules to make dependencies clearer and separate governance. . . However, most browsers do not support these modular standards at present. The final step of modular development generally requires packaging. To put it bluntly, our js is packaged into a file that can be executed in the browser.
Novice can refer to this article:http://zhaomenghuan.github.io/#! /blog/20160415