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

Transpiling ES6 to ES5 on "prepublish" -> fixing Safari "const" #4

Closed
wants to merge 4 commits into from
Closed

Conversation

thgala
Copy link

@thgala thgala commented May 11, 2017

Current library uses ES6 code in main output file. Safari 10.11.* (El Captain) does not support ES6 "const" in "strict mode" (as well as arrow functions). Original console error message: "Const declarations are not supported in strict mode".

On "prepublish" command I suggest transpile all ES6 code (include node_modules) to ES5, minify and make ES5 /lib/bundle.js as a main library file (for NPM). In github ES6 source code will be available in /src folder.

@sindresorhus
Copy link
Owner

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

Repository owner locked and limited conversation to collaborators May 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants