Provide uncompiled API lib for node usage #59
Comments
Is the request that the contents of the Can you clarify what environment you're using the library in and what specifically is making it really difficult to debug? I'd like to understand better since, as far as I know, Babel-compiled ES6 code seems to be a rather common, conventional way of writing JavaScript these days. I want to make sure I'm not missing the crux of the problem and the request. |
Well for the browser there is no other way that is right. But the only (don't pin me down on that) feature that node doesn't have and you use are imports. Paying the price of having compiled code for that is a little high, imo. Source maps only work well in a limited fashion for production code and backend workflows. For examples I currently cannot print out Tracer instances or inspect the via repl. Also I am doubtful that babel transpilation is common on the backend. I would strongly recommend against this and never take such code into production. The suggestion would rather be to make src work on vanilla node and branch at downstream compile time for the platform: browser get transpiled JS node takes ESnow. |
I hear you, esp. with regards to source maps and production code. Thinking aloud, if the library goes this route, we'll need to nail down what version of "vanilla node" should be targeted. |
Being close to node I would say v4 would be the most maintainable / readable bet, also since it will stay around for a while due to Node LTS cycle. This would basically allow you to run most of the codebase by replace imports / exports with require. 0.12 doesn't support |
For the moment we need 0.10 compatibility. |
That would loose class and Object.assign (there are good useland modules for that). class shouldn't be a problem since you do not inherit. Otherwise inheriting would need util |
The compiling makes debugging really difficult.
The text was updated successfully, but these errors were encountered: