hisabimbola
hisabimbola

Reputation: 306

Should I build a node module with ES6

I am planning to build a node module and I want to use ES6, basically because it will give me the opportunity to learn it better but I am not sure whether it's the best tool to use.

I tried searching npmjs.org, but did not find any module that was built with ES6 best I saw was coffeescript.

I would like to know if you would advise I use ES6 and the little gotchas I should expect.

Thanks

Upvotes: 0

Views: 100

Answers (1)

JMM
JMM

Reputation: 26827

If you write it with ES2015 you likely want to compile it to ES5 using something like Babel before publishing to npm at this point. Conventions or solutions may emerge for publishing both versions in the same package and letting consumers select the desired one.

If you do decide to use Babel to compile, check out the runtime transformer.

Upvotes: 1

Related Questions