Trying to create a simpler dev-test-prod workflow for my client-side dev where I don't have a developer site option.
I have a live site where I only have access to add scripts to the HEAD via a browser-based interface (think Wordpress/Shopify/etc). Using this option, I've been able to deploy working client-side apps by adding references to JavaScript bundles (created with webpack4) that I host in a a CDN I manage (that has CORS enabled). There is no development site. When I want to make changes to the app, I've been deploying those changes as testing in production. To avoid breaking changes for my users, I iteratively do very minor changes so I can quickly rollback.
What I'd like to do is find a way to change just MY experience so that for just my experience I hijack requests to specific JS files when using the live site.
I've tried using Chrome's local workspace & offline file feature, but I'm running into issues where the webpack generated JS files are failing to load from my local environment with CORS errors. However other scripts are loading just fine.
Specifically: I have three files, alpha.js, beta.bundle.js & charlie.bundle.js... the latter two are webpack bundles, the "alpha" file is a plain JS file that runs code in the global scope (it's similar to what the Google Analytics script does). All three are hosted and loaded from the same CDN. I can use Chrome's offline files and hijack alpha.js without a problem, but the beta & charlie bundles report CORS issues.
Two questions: (1) why would the webpack bundles cause CORS issues while the alpha.js file doesn't & (2) is there a better option for what I'm trying to achieve (without creating a dev site which is not an option)?