PortalKit: update index.js for fw part, to enhance the load time