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
黄舟2017-06-14 10:56:20
First try merging without compression to see if there is any problem, otherwise it is a matter of order
PHP中文网2017-06-14 10:56:20
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
扔个三星炸死你2017-06-14 10:56:20
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