Question-- Is there a way to save JS files with a file name that can be referenced as a source?
I’ve written a custom JS file which I run locally for testing (and push to github for version control);
I understand from some digging that to load a script on a single page, I have to add a JS file and then specify the page route to load it on if(data.page.Get('route') === '/')
When I test this on my site, I can see these JS files are not loaded separately but rather the script was compiled into other site scripts.
This makes making updates and changes challenging, as I have to first modify my test environment, and then modify the script again to be able to run it on the site. Aside from the fact this isn’t an efficient process, it’s also super prone to human errors.
Is there any way I can host a JS file (which I can re-upload when there are updates) which I then add in as a script source using the if(data.page.Get('route') === '/')
approach?