OpenAPI-Qraft / openapi-qraft

Generate a type-safe OpenAPI client for your React app
https://openapi-qraft.github.io/openapi-qraft/
MIT License
18 stars 1 forks source link

Implement CJS Distribution for Qraft React Client #62

Open radist2s opened 2 months ago

radist2s commented 2 months ago

Qraft React Client currently only supports ESM modules, limiting library size evaluation via bundlephobia.com. The task is to configure tsup to generate distributive files for both ESM and CJS formats, ensuring compatibility and extending usability for environments requiring CommonJS modules. This change will enhance the library's flexibility and marketing potential.

radist2s commented 2 months ago

Btw, as I remember, there is an issue with the tsup and source maps generation, when you debugging the app. It is important to keep previous DX with the debugging, when you set breakpoint and the call stops exactly in place.

radist2s commented 4 days ago

It looks like bundlephobia does not support exports from package.json. In a release version of a package with cjs support, bundlephobia will also not be able to display the package size correctly.

Related links: