Custom Widget - javascript file not refreshing in chrome

0
Hi, I followed the Building Custom Widget training: https://gettingstarted.mendixcloud.com/link/path/45 Everything works fine except the refreshing of the javascript code in my browser. I did copy the project inside the test folder created through yeoman, I am running my tests through this project as well. I have gulp running on the folder and I can see it does update my files succesfully. I tried several to Hard refresh in chrome with ctrl+F5, F5 in the Dev Tools, or by clicking the refresh button, but none work. I can see that the javascript source code in chrome is the old one… until I click on the Run button in the modeler. I’ve tried it with 2 different projects and still have the same issue, any idea of what stop I might be forgetting? Thank you, Sebastien
asked
2 answers
0

Cachebust, fix permanently

            dojoConfig = {
                baseUrl: "mxclientsystem/dojo/",
                //cacheBust: "{{cachebust}}", <- remove this
                cacheBust: new String((new Date()).getTime()),
                rtlRedirect: "index-rtl.html"
            };

 

answered
5

I strongly discourage the solution Ockert came up with, as you will switch off caching entirely, which is never a good thing.

The thing I always do when developing widgets is keep the Chrome Dev Tools open. In the Network tab you will see an option in the bar just below it named Disable cache. By using that, you are basically doing the same as what Ockert did, but you don't make any permanent changes to the rest of your project setup.

answered