@HenrikJoreteg If understand you correctly, you should be able to match for the .js file extensions and handle them differently. Something like:
/*.js /jsnotfound.html 404
/* /index.html 200
My tweets and posts live here on my own domain these days.
You can explore them here and follow me on Mastodon instead of Twitter where I'm not currently active.