Fix JS not recompiling when target changed.