Javascript libraries and Compilation

I occasionally find the same: the built HTML file is not updated to the same as the source file. I have not been able to establish a pattern; it seems somewhat random.

What I do in cases like this it to "clean" the build (i.e. delete all the files in the publish folder) by right-clicking the project in the Project Manager pallette, and then build the project again.