Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref #1595
This has package.json change. So, please run
npm i
. Also, I was not sure if I should checkin the package lock file, so, committed that as a separate commit.This PR starts using terser, but does some more.
I have created a rollup config which does the following:
dist/es6
dist/esf
(useful for importing as modules)dist/esm
dist/esm-min
Currently it is not integrated with grunt. To test it, run the following:
I have included b0b66a7 which is part of #1601. I wanted to verify that with this change, the ESM version does not have
import * from 'd3'
.Please see the output. For me also it was first such attempt.
It is clear from the output what rollup module splitting gives. We need to decide which of these six different output formats we need to include in our distribution.
The ESM output also shows that while our code imports everything from d3, the rollup output uses named imports.