Skip to content

Use @turf/jsts, reduce bundle size#2217

Merged
JamesLMilner merged 2 commits intoTurfjs:masterfrom
JamesLMilner:buffer-turf-jsts
Oct 26, 2021
Merged

Use @turf/jsts, reduce bundle size#2217
JamesLMilner merged 2 commits intoTurfjs:masterfrom
JamesLMilner:buffer-turf-jsts

Conversation

@JamesLMilner
Copy link
Copy Markdown
Collaborator

@JamesLMilner JamesLMilner commented Oct 23, 2021

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Have read How To Contribute.
  • Run npm test at the sub modules where changes have occurred.
  • Run npm run lint to ensure code style at the turf module level.

This PR uses the new @turf/jsts package rather than turf-jsts.

You can see the difference in bundle sizes for those packages:

https://bundlephobia.com/package/@turf/jsts@2.7.1
https://bundlephobia.com/package/turf-jsts@1.2.3

Assuming you had a barebones build that used @turf/buffer you'd see the following improvements (around 18% decrease in bundle size):

Before:

image

After:

image

Copy link
Copy Markdown
Collaborator

@twelch twelch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Nice work migrating.

@JamesLMilner JamesLMilner merged commit cd719cd into Turfjs:master Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants