简体   繁体   中英

Combining javascript files on the server

Just like you can extend html pages on the server. I wanted to know if there is any method to join javascript files on the server using node and express or any thing else that works with node. So as to minimize the number of files i have to link to the document and as well as keeping javascript files separate from each other.

In fact it's better doing it once before deploying your js files on your server, to get better performances, than doing it on runtime.

You may do this with tools like grunt and the task grunt-usemin It will not only allow you to concatenate your files, but also to compress with uglify.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM