Closed sveisvei closed 3 years ago
This could definitely help: https://tsdx.io/. I will check this weekend and let you know. Thanks for the feedback!
@soywod I did fork and tested tsdx on your repos locally, and it seemed to work out of the box.
Awesome @sveisvei! Maybe consider proposing a PR? So you will be part of the contributors :smiley:
BTW, I think it is sth to replicate on https://github.com/soywod/pin-field.
@soywod I did what I had the time to do - you can test them - or do something similar yourself. Let me know if I can help more later.
@sveisvei sorry I read your message after reviewing your PR https://github.com/soywod/pin-field/pull/1. I will adapt what you did and merge ASAP. Thanks for the initiative :tada:
I guess it should work now thanks to https://github.com/soywod/react-pin-field/pull/30, feel free to reopen if you still have issues.
Building this with vite.js creates a problem when not targetting commonjs.
The source of the problem is form "index.js" and
Object.defineProperty(exports, "__esModule", { value: true });
.The browser error is:
Uncaught ReferenceError: exports is not defined
I think changing the "module" in tsconfig from "commonjs" to "umd" might fix this, or even better move to a more broad target https://tsdx.io/ - e.g. like headlessui: https://github.com/tailwindlabs/headlessui/blob/develop/scripts/build.sh#L8