GoncharukOrg / react-input

100 stars 7 forks source link

react-jsx-runtime.development.js bundled into dist InputMask.js #17

Closed alextompkins closed 7 months ago

alextompkins commented 8 months ago

It is best practice to externalize all node_modules imports in a library. I can see that you're already doing this correctly for react, but you have not externalized react/jsx-runtime. This means that dist/module/InputMask.js (and the commonjs equivalent file) ends up with the entire React jsx-runtime injected into it, as you can see here.

This causes problems for me because I'm trying to use your package with preact, and I should be able to alias react/jsx-runtime to preact/jsx-runtime - but I can't if it is already inlined. It also causes unnecessary bloat in your package.

alextompkins commented 8 months ago

I've opened a PR (https://github.com/GoncharukBro/react-input/pull/18), based on my testing this resolves the issues with preact compatability :)

GoncharukBro commented 7 months ago

Thanks for opening the topic, please update the package to the latest version, which solves this problem:

npm i @react-input/mask@latest