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

es6 code not supported in some browsers #22

Closed
hoperyy opened this issue Jul 5, 2018 · 1 comment
Closed

es6 code not supported in some browsers #22

hoperyy opened this issue Jul 5, 2018 · 1 comment

Comments

@hoperyy
Copy link

hoperyy commented Jul 5, 2018

Can you support es5.

Some library like ''string-width" depends on it so I cannot modifiy the es6 code directly.

Thanks!

@sindresorhus
Copy link
Member

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.

@chalk chalk locked as resolved and limited conversation to collaborators Jul 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants