UNPKG

has-dynamic-import

Version:

Does the current environment have `import()` support?

10 lines (8 loc) 226 B
'use strict'; /** @type {() => Promise<void>} */ module.exports = function () { // @ts-expect-error ts(2307) this is a data URI const promise = import('data:text/javascript,'); promise.catch(() => {}); return promise; };