Recently I was recently notified about the Chrome extension Resource Override.
To set this up you will need to do this 4 easy steps:
- get this extention to your Chrome or Firefox browser
- create a rule to override your (.js, .css or any kind of) file
- create local server to serve your file
- avoid file caching in APEX
First two points are covered on the project page above, just a note that syntax is "glob like" syntax. Basicaly it is similar to LIKE in SELECT, you just use "*" instead of "%". For example my rule for Oracle cloud server look like:
Tab URL: *.eu-frankfurt-1.oraclecloudapps.com* From: *global.js* To: http://localhost:8080/workspace_files/global.js
So every request of global.js file to the cloud server is replaced by the content in my localhost file (Documents/PROJECTS/CORE/apex/workspace_files/global.js). For this I use Python3 with integrated http server, I just go to the folder with the files I would like to use and start the server:
cd Documents/PROJECTS/CORE/apex python3 -m http.server 8080
And to avoid file caching in APEX I use G_VERSION (application) item with a simple computation (Expression):
That's it. Now I can change my file in a favourite editor, refresh page in APEX and see the changes without the need to re-upload file every time.