Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.7 issue in IE11 (with polyfill) #76

Closed
ihardyslide opened this issue Dec 5, 2019 · 3 comments
Closed

3.1.7 issue in IE11 (with polyfill) #76

ihardyslide opened this issue Dec 5, 2019 · 3 comments
Assignees

Comments

@ihardyslide
Copy link

Hi,

this week I upgraded from yall 2 to 3.1.7.
I've done this for two projects:

  • one bundled by parcel
  • one bundled by a combination of gulp & rollup.

I added the polyfill for IntersectionObserver as advised.

The problem I have, is in the project bundled by parcel, the other one is working fine by chaining a rollup-plugin-babel in there.
Somehow, parcel does not transform the required yall module, which is a problem, because it always delivers code with arrow functions (=>), which are not supported by IE11 and causes everything to crash.

I've read like 20 GitHub issues e.g.:

parcel-bundler/parcel#2500
parcel-bundler/parcel#13
parcel-bundler/parcel#559
parcel-bundler/parcel#2073

and so on, but there seems to be no real solution.
May I ask why there are arrow functions in the dist files when it aims to support IE11?

Any hint in the right direction would be highly appreciated!

Thanks in advance

@ihardyslide
Copy link
Author

ihardyslide commented Dec 12, 2019

Hi,

we have fixed it with a workaround, by copying a .browserslistrc file in the node_modules directory of your yall-js module.
The content of it is e.g. node 13.

Since you don't have this file by default, parcel just thinks your code is written without using new features (so parcel thinks this module supports everything) and there is no need to transpile with babel.

When we add this file before parcel runs, parcel respects it, sees that there is a discrepancy between your and our browserlist and therefore transpiles before it bundles everything.

I suggest putting this file in your repository, so others won't run in the same issue as me or something similar.

Br

@malchata
Copy link
Owner

Interesting. I haven't tested this with Parcel, but I've been wanting to pull config out to separate files anyway. I'll do this for the next release and follow up with you.

@malchata malchata reopened this Dec 13, 2019
@malchata
Copy link
Owner

D'oh, closed by mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants