Closed jimmywarting closed 1 year ago
looking at the source i found this:
import { URLPattern } from "./dist/urlpattern.js"; export { URLPattern }; if (!globalThis.URLPattern) { globalThis.URLPattern = URLPattern; }
globalThis.URLPattern ??= await import('./dist/urlpattern.js') export { URLPattern }
globalThis.URLPattern ??= require('./dist/urlpattern.cjs') export { URLPattern }
??= maybe is to new-ish but you get my point... you could use top level await to conditionally load URLPattern if needed.
??=
nvm, getting ahead of myself. i look at the source code before i read the README 😅
looking at the source i found this:
??=
maybe is to new-ish but you get my point... you could use top level await to conditionally load URLPattern if needed.