I deployed a Firebase app, and made a change to one of the JavaScript files in the project. I re-executed firebase deploy
from the project directory, but the files on the site are not updating. When I deploy, the account management shows that an update occurs, but the file remains unchanged. Am I doing something incorrectly? How can I fix/troubleshoot this? Any help would be appreciated.
Thanks
You cannot change hosted files in the Firebase Console. Instead, you should change the index. html on your local copy where you initially ran the firebase deploy command. Once you're done with the changes, run firebase deploy again to push the updated version of your website to Firebase Hosting.
To deploy resources from a project directory, the project directory must have a firebase. json file. This file is automatically created for you by the firebase init command.
Firebase Hosting supports a REST API for advanced developers to build custom workflows, like deploying through a JavaScript app. We also have a Node. js module which you can import into your Node. js apps to build advanced functionality.
If the deploy is successful, this is likely a caching issue.
You can try pressing cmd+shift+R (ctrl+shift+R on Windows) to do a hard refresh of the cache.
Try going to the file's URL directly (https://<my-app>.firebapp.com/app.js
), and do a hard refresh. You should see it update to what you have locally.
With Chrome, you can have the cache disable when DevTools are open by selecting the "Disable cache" option in the Network tab.
make sure you're building any new changes you've made before deploying.
For example if you have an angular 2 application and are using the angular cli type ng build then firebase deploy.
To clear cache press Ctr+F5 or better use incognito Mode for Development. using Incognito Mode for force reload works well for Mobile as well as desktop.
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