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

How to target ES6? #4421

Closed
sinedied opened this issue May 8, 2018 · 5 comments
Closed

How to target ES6? #4421

sinedied opened this issue May 8, 2018 · 5 comments

Comments

@sinedied
Copy link

sinedied commented May 8, 2018

I'm trying to write a React app that makes use of the new AudioWorklet processors, but I'm facing a wall: to communicate data with the main thread, I need to extend the AudioWorkletNode class as seen here: https://github.com/GoogleChromeLabs/web-audio-samples/blob/gh-pages/audio-worklet/basic/message-port.html#L70-L95, but it does not work when the class is transpiled to ES5 function.

Is there a way to configure babel to emit es6 instead of es5?
Thanks

@Timer
Copy link
Contributor

Timer commented May 8, 2018

You can try the new betas, npm upgrade react-scripts@next; followed by yarn start and [enter].
This will add browser support targets to your package.json, which you can then edit.

@Timer Timer closed this as completed May 8, 2018
@Timer
Copy link
Contributor

Timer commented May 8, 2018

#3815

@sinedied
Copy link
Author

sinedied commented May 8, 2018

Thanks for the quick response!

@Timer
Copy link
Contributor

Timer commented May 8, 2018

No problem! Let us know if you encounter any bugs.

@cstsortan
Copy link

Useful, I want to use Web Components and add them to my bundle, but they require an ES6 target

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
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

3 participants