Open radavis opened 7 years ago
Thanks, I completely overlooked this. There are a handful of breaking changes coming in for a 2.0 release, so I will be sure to precompile the library to ES5 before publishing the new package.
Yes, was not able to use this today because async/await not support by create-react-app. What solution do you recommend in order to use this from npm.
@adrienshen This was a bad mistake on my part. There's nothing you can reasonably do right now unless you want to clone the source, build the library, and manually use it in your project (probably not worth the hassle).
I'm working on a fix now and should have something published this week.
Apologies for the delay here, guys. JS source packaging and distribution is a mess of complexity, in my opinion, between needing to support the various build systems, environments, package managers, and module loaders.
After doing some research, it appears the correct approach is to provide both precompiled and vanilla source in the same package.
By doing this, you can either:
I'm hoping to have a reasonable solution soon. Thanks for your patience.
👋 I ran into the same problem. Here's an example project that reproduces an error using it. https://github.com/scmx/experiment-instascan-babel-brunch/commits/master I tried to work around it by having brunch transpile it for me, but I didn't succeed.
Uncaught Error: only one instance of babel-polyfill is allowed
http://stackoverflow.com/a/41797876 Generally only overall applications should be loading global plugins. If you're writing a library like a Babel plugin, you should either assume the user of your library will load it for you, or you should use transform-runtime.
@scmx I managed to get mine working with your branch https://github.com/scmx/instascan/tree/replace-babel-polyfill-with-transform-runtime merged from master.
Make a PR ;)
Thx
@pakokrew Pull request against 1.0.0 or latest master?
If think I tried with latest master @scmx
schmich, when do you think your release 2 will be ready and particularly this point? Greets
i'm having same problem =/
Any updates? So is this working on react-native? Would like confirmation before making the plunge ;)
It would be helpful if this was compiled to ES5. Webpack/Babel isn't able to compile it when added as a dependency to
package.json
.http://stackoverflow.com/questions/43417654/create-react-app-and-javascript-dependency-that-is-using-async-await-fails-to-co/43418589#43418589