kylepaulsen / ResourceOverride

An extension to help you gain full control of any website by redirecting traffic, replacing, editing, or inserting new content.
MIT License
467 stars 117 forks source link

Can this work with Vite projects? #65

Open smozingo opened 7 months ago

smozingo commented 7 months ago

This worked so well with our CRA implementation, allowing us to access network resources from our staging environment while redirecting to our local bundle was a huge leap forward in productivity.

Unfortunately, now that CRA is deprecated, we've had to move over to Vite (which is great in its own right, but...)

I cannot get Vite to play well with Resource Override. I can redirect from https://www.mycdn.com/my-app/assets/* to https://localhost:8443/dist/assets/* but the vite dev server won't provide a working app. I've verified that the index-xxxxx.js files are identical on both of those urls. When we pull it from the cdn, the app works. When it gets redirected to the local version, the vite dev server gets wrapped around the axle.

Has anyone tried this out with a vite project?