Set CORS headers for fast-refresh #11139
Unanswered
nandastone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My React app is loaded across domain in development, and I have configured my React app to also load bundle chunks across domain using
__webpack_public_path__
.For example:
Page on
https://test.local
-> embedshttps://host.docker.internal:3002/static/js/bundle.js
-> loadshttps://host.docker.internal:3002/static/js/0.chunk.js
.The issue is during hot-loading, the update JSON is also loaded from cross-domain resulting in a CORS error:
As CRA doesn't allow configuration access to webpack-dev-server, I can't think of a way around this aside from disabling fast-refresh via the
FAST_REFRESH=false
env variable.Does anyone have a better idea or solution?
Beta Was this translation helpful? Give feedback.
All reactions