imgix / gatsby

A simple yet powerful integration between Gatsby and imgix
BSD 2-Clause "Simplified" License
30 stars 6 forks source link

Js-core being exported in production as 57.7kb #181

Closed ChrisBudetti closed 2 years ago

ChrisBudetti commented 2 years ago

v2.0

All types are being exported when using the frontend hook. Bundlephobia is unable to check size https://bundlephobia.com/package/@imgix/gatsby

Steps to reproduce

  1. import { getGatsbyImageData } from "@imgix/gatsby"
  2. View bundle size
image
ChrisBudetti commented 2 years ago

Import {getGatsbyImageData} from "@imgix/gatsby/src/modules/gatsby-transform-url/gatsbyPluginImage" seems to have solved the issue on my end

sherwinski commented 2 years ago

Hey @ChrisBudetti and thanks for opening this issue. I've noted this issue in our team's backlog so that we can set some time aside to look into it soon. I'll be sure to follow up with any updates or questions here.

luqven commented 2 years ago

Hey @ChrisBudetti,

The latest release, v2.0.4, appears to show the dependencies on bundlephobia correctly.

You'll note the bundle size change as a result of re-factoring out the fp-ts package and introducing the joi dependency.

For now, it looks like it's safe to close this issue. But if I've missed anything please don't hesitate to comment and I can come back and re-open this.

Thanks!