Skip to content
Adam Bradley edited this page Dec 9, 2021 · 4 revisions

The distribution comes with multiple files:

  • /~partytown/partytown.js

    • The initial script to be loaded on the main thread.
    • Minified and property renamed.
    • Console logs removed.
    • Contents of partytown.js could be inlined in the HTML instead to reduce an extra HTTP request.
    • Loads:
      • partytown-sw.js: Minified service worker with inlined sandbox and web worker.
  • /~partytown/debug/partytown.js

    • Debug version of /~partytown/partytown.js.
    • Additional request for sandbox and web worker.
    • Not minified.
    • Includes console logs.
    • Loads other debug library scripts.
    • Not meant for production, but useful to inspect what scripts are up to.
    • Loads:
      • debug/partytown-sw.js: Service worker with separate sandbox request.
      • debug/partytown-sandbox.js: Sandbox with separate web worker request.
      • debug/partytown-ww.js: Web worker as separate file, not inlined.
  • /~partytown/partytown-snippet.js

    • The same snippet code which should be copy and pasted into the head.
    • Provided for reference only.
Clone this wiki locally