Is it possible to generate javascript bytecode without execution?

I have a question about that can the js bytecode can be generated without being executed?

For do some malicious analysis, i want to extract javascript bytecode. However, as the design of JIT comilation, the code seems will be executed before bytecode are generated.

I was also thinking about using node vm or vm2 to get the bytecodes, but the document says it is not recommended to use vm, vm2 to run un-trusted code.

Is it possible to generate the bytecode without execuate it, or is there any tool can do this?

Thank for sharing if anyone knows