prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
153 stars 40 forks source link

Is imgix-url-builder missing as a dependency? #200

Open WCByrne opened 3 months ago

WCByrne commented 3 months ago

Versions

Reproduction

Sorry for the minimal report, happy to clarify anything if needed but this seems pretty straightforward.

It seems that PrismicImage imports imgix-url-builder but it is not listed as a dependency of this package anywhere. I'm getting TS errors about not being able to resolve the module or its types.

../../.yarn/__virtual__/@prismicio-react-virtual-943ea0185c/0/cache/@prismicio-react-npm-2.7.3-0097aeb467-0df26301c5.zip/node_modules/@prismicio/react/dist/PrismicImage.d.ts:553:26 - error TS2307: Cannot find module 'imgix-url-builder' or its corresponding type declarations.

553         txtfont?: import("imgix-url-builder").Font | null | undefined;

Steps to reproduce

I haven't tested with a fresh test project but it seems obvious that if you're using a package it should be listed as a dependency.

What is expected?

What is actually happening?

Throws the TS error above. This is resolvable by adding the following to yarnrc but this shouldn't be necessary.

packageExtensions:
  "@prismicio/react@*":
    dependencies:
      imgix-url-builder: "*"