Andarist / react-textarea-autosize

<textarea /> component for React which grows with content
http://andarist.github.io/react-textarea-autosize/
MIT License
2.18k stars 244 forks source link

When importing in Astro it fails to resolve (v8.5.0) #375

Closed amerikan closed 1 year ago

amerikan commented 1 year ago

I tried using latest version (v8.5.0) within Astro.build and I get import error:

Failed to resolve entry for package "react-textarea-autosize". The package may have incorrect main/module/exports specified in its package.json.

In my file I use esm:

import TextareaAutosize from "react-textarea-autosize";

Temporary Fix I installed v8.4.1 instead and it works fine with that version.

Something in v8.5.0 cause a regression?

Andarist commented 1 year ago

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can't afford the time to set up the repro, even if exact steps are given.

amerikan commented 1 year ago

@Andarist got it!

It's weird because v8.5.0 works when I build with astro build it works fine, but crashes at runtime with astro dev. With v8.4.0, it fails to compile with astro.build, but no runtime crashes with astro dev. Maybe it's some astro problem. I'll dig further, closing this issue for now.