As for how to combine the JS files, this can simply be done by copy / pasting the code from one file into another. For example, once the code from FileA has been copied to FileB, FileA can be removed along with the call for this file within the HTML document.
Combine External CSS
Additionally, avoid using @import to import all of your external CSS files into one main file. This method can introduce additional delays since it is unable to download multiple stylesheets in parallel. Instead use the method described above which physically combines the CSS from one file into another, instead of just importing multiple files into one.
HTTP/2 and Combining External Files
If you end up combining all JS and CSS files into one file each and a request is made for a component within that file, it only has one option - to request the single large file. However, if the files aren’t concatenated and a request is made for a component in a single file, the download time will be much shorter as the file is not part of a large “master” file.
With HTTP/2, it is important to focus more heavily on the caching of files via a CDN, leveraging browser caching, etc. Concatenating JS and CSS files is no longer best practice with this new protocol.