So, to be clear
We are saying that javascript files of all sizes can be saved to Content Snippets?
And after saving the js file to a new Content Snippet, one should add the file to the Web Page via the following
{% include 'snippet' snippet_name:'YourSnippetName' %}
What about Web Files? or Child Pages?
Why does the Content Snippet offer only "Text" or "HTML"?
It seems the logical place for a JS file would be as a Web File.
At present, uploading a large JS file as a Web File creates the following error
You have exceeded the maximum number of characters in this field.
I also do not see an upload button within the Notes section of Web Files.
A web file represents downloadable file in a portals website, used to store images, documents, and any other file type.
Create and manage web files - Power Apps | Microsoft Docs