refactor js packer