8 – can I set multiple JavaScript files on a custom module library?

Drupal doesn’t put any limit on the number of JavaScript files a library can contain. This is how the drupal.collapse library is defined in core.libraries.yml.

  version: VERSION
    misc/details-aria.js: {}
    misc/collapse.js: {}
    - core/jquery
    - core/modernizr
    - core/drupal
    - core/drupal.form
    - core/jquery.once

It’s not a common case in Drupal core, as most of the libraries contain a single JavaScript file, and adds the other files as dependencies, but that doesn’t mean a library cannot contain more than a JavaScript file.

In the case of using a jQuery file different from the one used from Drupal core, I would be careful, and first verify it doesn’t create issues.