question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE 11 Issue with dist code 4.1.0-beta.1

See original GitHub issue

@ctrlplusb I was testing the above beta on IE and found the following error: Expected ‘;’ And in researching, I narrowed it down to this code:

var pReduce = function pReduce(iterable, reducer, initialValue) {
  return new Promise(function (resolve, reject) {
    var iterator = iterable[Symbol.iterator]();
    var index = 0;

    var next = async function next(total) { 👈🏽 // the async keyword I think is the problem
      var element = iterator.next();

      if (element.done) {
        resolve(total);
        return;
      }

      try {
        var value = await Promise.all([total, element.value]); // eslint-disable-next-line no-plusplus

        next(reducer(value[0], value[1], index++));
      } catch (error) {
        reject(error);
      }
    };

    next(initialValue);
  });
};

This is from the dist folder ‘index.js’ . Isn’t this code supposed to be transpiled down to ES5 in the dist folder? Or is that my job? I ask because most of the other stuff seems to be ES5 code (or at least IE11 compatible code).

I used it with the top-level imports you recommended

import 'easy-peasy/proxy-polyfill';
import 'easy-peasy/map-set-support';

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rmcariascommented, Oct 21, 2020

@ctrlplusb tried it again and we still have one more place where it bombs

 return {
    persist: persist,
    clear: createPersistenceClearer(persistKey, references),
    flush: async function flush() { 👈🏽 // it seems your transpiler is not catching eveything?
      if (nextPersistOperation) {
        nextPersistOperation();
      }

      await persistPromise;
    }
  };
}
0reactions
ctrlplusbcommented, Oct 25, 2020

That did the trick! IE is up and running.

🎉

On another note: I wanted to ask, do you have example sites that use easy-peasy with TS?

I am updating the comment blocks for the types themselves so you should hopefully get useful information within your IDE as you use them. In the interim have you looked at the API section of the docs? We do have docs for the TS types within there too. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browser compatibility: not working on IE11 after 'yarn build' ...
Version 3.9.2 Environment info Binaries: Node: 10.15.1 ... shows 'ie 11' indeed, but codes in /dist/js/*.js still exist some parts such as ...
Read more >
NET Framework problems with Internet Explorer 11
For 32-bit processes on x64 systems: Go to the HKLM\SOFTWARE\Wow6432Node\MICROSOFT\.NETFramework registry key and change the EnableIEHosting ...
Read more >
Angular 2 / 4 / 5 not working in IE11
@dudewad I was experimenting with creating 2 separate bundles, one explicitly for IE11, and then wrapping that bundle in an IE conditional comment...
Read more >
Swiper Changelog
4.0.1 - Released on October 11th, 2017. Fixed issue with pagination being broken with loop mode; Reworked realIndex calculation ordering; ES ...
Read more >
Release notes | U.S. Web Design System (USWDS) - Digital.gov
Here you'll find our release notes — summaries of bug fixes, new features, and other updates introduced in each release. Have suggestions for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found