Closed fubuloubu closed 9 months ago
Did this to work with the JS SDK in chaosnet app. Not a great permanent solution, but maybe an informative step toward it:
https://gist.github.com/mikeshultz/cc35224bc440affa8fad585b27f8fe9f
I think the biggest challenge is that it's a TS package, so whatever is compiling the host app, needs to be aware of these TS files as well. Otherwise, if it just looks at package.json
it'll use the dist in the module
prop.
I doubt this is an uncommon problem though, so there's probably a decent workflow for this that doesn't require us live-patching vite configs.
Also, if you run npm link
in each package (like @apeworx/apepay
and @apeworx/apepay-react
) you can run npm link @apeworx/apepay-react @apeworx/apepay
to link in both packages. The vite config still needs to be updated for both but to use TS but it works.
_Originally posted by @fubuloubu in https://github.com/ApeWorX/ApePay/pull/43#discussion_r1336414376_