Fixed the optimzation of generated JavaScript sources to work property in `stage` task