.. / tsup
Star Fork

The simplest and fastest way to bundle your TypeScript libraries.

tsup
egoist
...

≤8.3.4 | CVE-2024-53384

<img> @name @src 🛡️ strict-dynamic ⏱️ before-load
More information

Root Cause

Source: https://github.com/egoist/tsup/blob/92ee84251f7c5dad7691f6052eb8b767899e0cff/assets/cjs_shims.js#L6

const getImportMetaUrl = () =>
  typeof document === 'undefined'
    ? new URL(`file:${__filename}`).href
    : (document.currentScript && document.currentScript.src) ||
      new URL('main.js', document.baseURI).href

export const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()

Related links:

Found by jackfromeast, ishmeals.


Source | History