wopian / kitsu

🦊 A simple, lightweight & framework agnostic JSON:API client
https://yarn.fyi/kitsu
MIT License
270 stars 42 forks source link

Change output directory name request #510

Closed kacianoghelere closed 3 years ago

kacianoghelere commented 3 years ago

Hi there! I'll try to be brief.

Can you consider changing the kitsu-core output directory from lib/ to dist/? We are using it with react native and our build tool is recompiling the code, causing crashes and others errors. It took almost two days to find the problem cause and it happens because the builder ignores everything inside dist/ directories, but it doesn't work the same way with the lib/ dir.

I know that we could try to fix it on our side but I think that, by simply changing the output directory name, a lot of people could be spared from the headaches we had.

wopian commented 3 years ago

Hey @kacianoghelere, I can definitely do this to avoid the recompilation issues you're having withkitsu-core in React Native.

~Fortunately due to the exports feature added in Node 12+ this can be a seamless behind the scenes change instead of a major breaking change, so I can safely fix this on 9.x and the alpha 10.x releases 👍~

Seems I never set up the exports from the root directory and instead on lib/*.{m?js}, so this will only be available on the alpha 10.x release

kacianoghelere commented 3 years ago

Hi @wopian, many thanks man! We're using the 10.x alpha version in our app, so we really appreciate it.

wopian commented 3 years ago

Released 10.0.0-alpha.9.