Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transpile src? #87

Closed
vasturiano opened this issue Nov 26, 2018 · 7 comments
Closed

Transpile src? #87

vasturiano opened this issue Nov 26, 2018 · 7 comments

Comments

@vasturiano
Copy link

As of v2.0.0 d3-array is exposing non-ES5 code as part of the ES modules entry point src/index.js. F.e.:
https://github.com/d3/d3-array/blob/master/src/min.js#L2

I think this may be causing some building issues for consuming applications that assume the code is ES5 compatible and are not transpiling their node_modules (as is the norm).

Possibly d3-array should add a transpilation phase to the rollup builds and expose the modules entry point from the dist folder instead of src directly.

If it's of any help, I've done a similar thing to a d3 plugin here:
https://github.com/vasturiano/d3-geo-zoom

@curran
Copy link

curran commented Nov 26, 2018

Related to #80

This problem will keep coming up. It sounds like a good idea to deliver ES5 as the CommonJS entry point.

@mbostock
Copy link
Member

Sorry, but I’ve switched to ES2015 going forward, and future major versions of D3 modules will be using ES2015. If you want to stick with ES5, you should stick with the previous major version. The primary reason that I will not provide transpilation to ES5 is that I want to use runtime features, not just syntax. That, and supporting ES5 environments will be an ongoing burden and I want D3 to have access to modern language features.

@gordonwoodhull
Copy link

Hi @mbostock. Does it follow that D3v5 is the last to support IE and D3v6 will not?

I.e. will D3 continue to be bundled the same way and will this force a major version of the bundle as well?

(This would be easy to explain to people.)

@mbostock
Copy link
Member

Yep!

@JamesIves
Copy link

JamesIves commented Jan 8, 2019

@mbostock Would you be able to add a note about the drop of IE support to the release notes for version 2.0.0? It wasn't easy come by this thread and it took a bit of debugging to figure out where this error was coming from.

@mbostock
Copy link
Member

mbostock commented Jan 8, 2019

@JamesIves Sure, done.

@JamesIves
Copy link

Appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants