[build] changeReferenceToken before prepareFunction