Whenever I deploy my Firebase app for hosting that is a packaged Create-React-App then the first time the browser loads it the console shows:
main.27e9b1c2.js:1 Uncaught SyntaxError: Unexpected token <
F5 refresh fixes it. Then the site is working perfectly until the next time I deploy.
I am using firebase hosting and firebase tools to deploy. The number on the mainjs is the current build.
you can disable cache in firebase.json
"headers": [
{
"source": "/service-worker.js",
"headers": [{ "key": "Cache-Control", "value": "no-cache" }]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With