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

Make default source files es5 compatible #44

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Make default source files es5 compatible #44

wants to merge 2 commits into from

Conversation

256dpi
Copy link

@256dpi 256dpi commented Oct 21, 2018

I had some troubles using this library in a project using parcel. The issue was that the jsesc code base uses some es6 syntax, but does not transpile the code. Most tools assume that code linked from the main field in package.json point to source code that uses only es5 syntax. There are attempts to use other fields to point to es6 modules. However, for that to work, the code base first needs to be fully migrated to es6 syntax and used es modules e.g. import and export syntax.

This PR fixes the issue temporarily by transpiling the current code base to es5 using babel.

@mathiasbynens
Copy link
Owner

Did you see https://github.com/mathiasbynens/jsesc#support? Is using jsesc@1.3.0 not an option for you?

@256dpi
Copy link
Author

256dpi commented Oct 23, 2018

I saw the notice. I also do not use the library anymore myself. Just wanted to help going forward with using es6 while still supporting es5 environments.

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.

None yet

2 participants