[JS] Prepare for nodejs package optimization