ES6 spread operator in npm package's dependency package

Hi,

When I meteor npm install bigchaindb-driver --save and try to use it (server side) I got error “Undefined symbol …” (ES6 spread operator) which is in another package five-bells-condition used by bigchaindb-driver package.

When I manually remove spread operator (modify code - replace spread operator with same code in ES5 syntax) everything works like a charm.

How can I instruct meteor to transpile this package (instead manually hacking?). Or… what to do? (I prefer as-less-as-possible “hack” solution).

Thanks! :slight_smile:

I had similar problem with some packages leaking to the client side although they were intended to be used only at the server. I was using them in Meteor methods which ended up being imported at the client.

Hi @alawi

Fact package is “leaking” to client side tells that something is possibly wrong with your code (not packages itself).

My temporary solution is here: https://github.com/bigchaindb/js-bigchaindb-driver/issues/92

But I hope there is better/more elegant solution (e.g. by instructing meteor to transpile the module).

Anyone?

Indeed it was my code,I had few misplaced imports. It’s worth noting that you can easily misplace packages to the client wihtin an isomorphic apps.