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

Added Babel transpilation #11

Closed
wants to merge 7 commits into from
Closed

Added Babel transpilation #11

wants to merge 7 commits into from

Conversation

PatrickShaw
Copy link

Ran into some issues with using this module in Internet Explorer 11. The module uses arrow functions which isn't compatible with IE11.

I've solved this issue by adding Babel as a build step before publishing the module to transpile the arrow function out of the package.

@SamVerschueren
Copy link
Collaborator

This module mainly targets Node.js, not the browser. It's up to you to transpile it with Babel if you want to use it in the browser. You can find a more detailed explanation here: sindresorhus/ama#446

If you use Webpack, check out babel-engine-plugin, which transpiles only the dependencies that needs to be transpiled.

@theKashey
Copy link

That's a bit wrong. I mean explanation you may find in the ama issue, and the principle your babel plugin utilize.
It's not about engine version in the package json, but about the "source" and the "target".

See more detailed explanation here: parcel-bundler/parcel#13

@SamVerschueren
Copy link
Collaborator

The point I'm making here is that it's not up to the package owner to add all of this bloat because users need it for IE11 or something. So the thing I was saying is that it should be handled by the bundler, not by package owners.

See #10 because it tried to add the same thing and the same answer was given. If you read the AMA you'll see all the packages that refer to that AMA with the exact same question and the exact same problem you have.

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

Successfully merging this pull request may close these issues.

3 participants