UNPKG

has-dynamic-import

Version:

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

12 lines (9 loc) 192 B
'use strict'; module.exports = function hasSyntax() { try { Function('import("").catch(() => {})'); // eslint-disable-line no-new-func return true; } catch (e) { return false; } };