react-digraph icon indicating copy to clipboard operation
react-digraph copied to clipboard

Can't use in project without babel

Open Prior99 opened this issue 7 years ago • 2 comments

The package distributed on NPM includes a non-bundled index.js which uses ES6 statements such as import.

Without Babel in the parent's project, this library can not be used. Or am I missing something?

Prior99 avatar Aug 06 '18 11:08 Prior99

I'm adding the enhancement tag because it highlights the need for ES5-compatible code. I believe the next major version should make this type of bundling easier as we'll be using Webpack for the bundle configuration. We should make sure the new code works both with Babel in Node as well as the browser using script tags.

ajbogh avatar Oct 09 '18 16:10 ajbogh

redux has separate entry points for compatible code.

As of v5, this package is being built strictly toward browsers, which means people can't use/test it with node.

@babel/cli should be used to package out the main file, so that it is compatible with node.

vikr01 avatar Nov 14 '18 19:11 vikr01