Out of the box, Prepack does not fully model a browser or node.js environment: Prepack has no built-in knowledge of document or window. In fact, when prepacking code which references such properties,…