Correctly process JS requires