graph.js
graph.js copied to clipboard
Exports using module.exports for node v8 support
By using module.exports for the class, node v8 (Current Node LTS) is able to load the library without babel polyfills or other transpiler.
I ran the 'pp' task which passed, and this is the result. I have included the src using node v8 and it loads without any further runtime.
Sorry for the delay in responding.
First thought: Moving the source-code away from ES6 modules is like taking a step backward. Your motivation is to be able to load the library without requiring the polyfill? That's fair enough, but I don't see a real downside to having a build-step. Want you like to try to provide that build-step?
Second thought: For libraries I don't see the point of committing package-lock.json
(or yarn.lock
) to version control. It won't be used by a project that has the library as a dependency. (Or did that change?)
Third thought: Have you looked at the failing CI?