zwave-js-ui/esbuild-import-meta-url-shi...

6 lines
245 B
JavaScript

export const __import_meta_url =
typeof document === 'undefined'
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
: (document.currentScript && document.currentScript.src) ||
new URL('main.js', document.baseURI).href