I have set a version number, autoincrement to true, and the HTML File to Index.html, but while the js file name reflects the version the script source in Index.html (which os always recreated in the output directory) doesn't reflect this. It just shows whatever it is set to in the source directory.
I guess the simplest way to do it would be to replace the script name with a tag, say and replace the tag with the new script name when the main html file is copied from the source to the output folder.