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.

ES6 code in production build breaks IE11

See original GitHub issue

I was hoping to give Recoil a try in one of my projects, but it looks like ES6 code is not being transpiled away in the production build:

const next=new Set(set);
class AbstractRecoilValue{constructor(newKey)

We sadly have to support IE11, would it be possible to update the rollup config to output ES5 code instead?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mondaychencommented, Jul 9, 2020

Let’s add ES5 transpiling in a separate PR (after #433 merged) so that we can test the impact on file size there.

Some thoughts on the options we have:

About loose mode: IMO we should NOT use babel loose mode because this is a library and we should not risk getting problems when switching to non-transpiled version in the future.

About providing multiple outputs: if we do see a relatively significant size impact in the output transpiled down to es5, we can consider providing one single ES-current uncompressed output, so that people who care about size a lot have the option to pick target browsers themselves.

0reactions
Brianzchencommented, Jul 9, 2020

@mondaychen I’ve checked out on my local and linked to my app. Seems to all work as expected without any random import errors that I had before.

But it’s still not transpiled down to es5. That would simple just to add @babel/preset-env, should we add it to #433 or have a separate PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack Build Fails to Render in IE11 | by Fernando Karnagi
Webpacker has a bug where it hard-codes UglifyJS options to { ecma: 8 } . So no matter how many Babel plugins you...
Read more >
React production build not working with IE 11 - Stack Overflow
I am using below statements at start of index.js to make code IE 11 compatible. import 'core-js/es6/map'; import 'core-js/es6/set'; import ...
Read more >
IE11 and the Missing Polyfills - DEV Community ‍ ‍
Well, it was very scary, and a bit unexpected. But, looking behind, we did everything to get into this trouble - we haven't...
Read more >
Ember app suddenly no longer working in IE 11 - Questions
Even if I am to go back and build the same code base from 5/4/2021, it will no longer work in IE 11,...
Read more >
Is your Vue app not working in IE 11? Here's how to fix it.
The main reason why your Vue app is breaking in IE11 is because the browser does not support modern JavaScript syntax.
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