Add Babel to Rollup publishing#1131
Merged
Merged
Conversation
Contributor
Author
|
@stebogit If we get this right we can now introduce ES6 code to any dependencies & internally. That means More and more dependencies are slowly introducing ES6 into their source code, I'd personally rather use real ES6 Classes than fake Functions that act like Classes. |
Contributor
Author
JSTS-free bundle filesize// JSTS Modules
export {default as difference} from '@turf/difference';
export {default as buffer} from '@turf/buffer';
export {default as union} from '@turf/union';
export {default as intersect} from '@turf/intersect';
// JSTS Sub-Modules
export {default as dissolve} from '@turf/dissolve';
export {default as hexGrid} from '@turf/hex-grid';
export {default as mask} from '@turf/mask';
export {default as squareGrid} from '@turf/square-grid';
export {default as triangleGrid} from '@turf/triangle-grid';
export {default as interpolate} from '@turf/interpolate';When commenting out the JSTS dependent modules from the index and the file size significantly gets reduced to: With JSTS bundle sizeThe difference in filesize between both is about 372KB which means JSTS inflates the TurfJS repo by 3x. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add Babel to Rollup publishing
First stab at trying to improve the published TurfJS bundle.
The ideal goal would be to "Tree Shake" JSTS's excess code and reduce the minified bundle of TurfJS.
✅ Success
30%(200 KB) 40% (317 KB)Bundle Before
Bundle Now
❌ Current Issues
babel()all the Tree Shaking is disabled and filesize is increased the current size.export *syntax fromturf-jsts