We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65e8547 commit df7360bCopy full SHA for df7360b
assets/cjs_shims.js
@@ -3,10 +3,11 @@
3
// if we export it as `const importMetaUrl = ... __filename ...`
4
// But using a function will not cause this issue
5
6
-const getImportMetaUrl = () =>
7
- typeof document === 'undefined'
8
- ? new URL(`file:${__filename}`).href
9
- : (document.currentScript && document.currentScript.src) ||
10
- new URL('main.js', document.baseURI).href
+const getImportMetaUrl = () =>
+ typeof document === "undefined"
+ ? new URL(`file:${__filename}`).href
+ : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
+ ? document.currentScript.src
11
+ : new URL("main.js", document.baseURI).href;
12
13
export const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()
0 commit comments