RaitoBezarius / AutobahnReact

Make realtime a breeze with React.
GNU General Public License v2.0
12 stars 4 forks source link

Not able to use ES2015 import #4

Open ghost opened 6 years ago

ghost commented 6 years ago

ES2015 imports don't seem to be (properly) supported, if they ever were. When I require the library like this:

const Autobahn = require('[your path to node_modules]/autobahn-react/dist/AutobahnReact.js');

it works, but when I do it with a proper ES2015 import, I'm getting this rather obscure error:

./node_modules/bindings/bindings.js
81:22-40 Critical dependency: the request of a dependency is an expression

./node_modules/bindings/bindings.js
81:43-53 Critical dependency: the request of a dependency is an expression

Needless to say, I'd like to be able to use proper ES2015 imports.

Since the last change was two years ago and issues don't seem to be taken seriously either, I reckon this library isn't actively maintained anymore, even though it's still relevant.

Does anybody know a good alternative?

ghost commented 6 years ago

Try KSDaemon/wampy.js and KSDaemon/wampy-cra for a much smoother and less buggy experience. Both projects are actively maintained, have better documentation and support chaining.