javascript - Why do I get an error after using gulp to merge and compress multiple js files and then directly import them into the page?
巴扎黑
巴扎黑 2017-06-14 10:54:20
0
3
808


Why do I get an error after using gulp to merge and compress multiple js files and then directly introduce them into the page? There is no error before being compressed and packaged. What rules should be followed? ? ? Solve

巴扎黑
巴扎黑

reply all(3)
黄舟

First try merging without compression to see if there is any problem, otherwise it is a matter of order

洪涛

The order of the src array is the order of the packaged code, so pay attention to the dependency relationship. For example, if a library depends on underscore, then the position of this library in the array must be after underscore.
It is recommended to put the tool library at the front

扔个三星炸死你

There is no need to compress js files like jquery, you can just import them directly on the page.
Usually you just need to compress the js and css that you hand-write

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template