canUseDynamicImport.js 444 B

1234567891011121314151617181920212223
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.canUseDynamicImport = canUseDynamicImport;
  6. /* istanbul ignore file -- @preserve */
  7. let result;
  8. function canUseDynamicImport() {
  9. if (result === undefined) {
  10. try {
  11. new Function('id', 'return import(id);');
  12. result = true;
  13. } catch (e) {
  14. result = false;
  15. }
  16. }
  17. return result;
  18. }
  19. //# sourceMappingURL=canUseDynamicImport.js.map