Reduce the size of the package (v7) #1501
Labels
enhancement
New feature or request
openapi-ts
Relevant to the openapi-typescript library
PRs welcome
PRs are welcome to solve this issue!
Description
I would like to reduce the size of the package. (v7)
Currently, the package install size is 38 MB, but reducing it should improve the speed of
npx
andnpm install
on CI.cf. https://packagephobia.com/[email protected]
Of the 38 MB, 30 MB is the
typescript
package and 7 MB is the@redocly/openapi-core
package.cf. https://packagephobia.com/result?p=%40redocly%2Fopenapi-core%2C+typescript
The
typescript
package is probably in peer if you use openapi-typescript, so there is no need to have it in dependencies.The
@redocly/openapi-core
package may possibly be a core feature of openapi typescript, but if it is not, but is a package that does remote schema acquisition and validation, it is fine to have it in peer.Proposal
Move dependencies on
typescript
from dependencies to peerDependencies.In addition, if possible, move dependencies on
@redocly/openapi-core
from dependencies to peerDependencies as well.If you want to use the all-in-one openapi-typescript, you can install the whole package including the peers, or if you only want schema-to-type conversion functionality or if you want fine-grained control, you can install only the lightweight openapi-typescript.
Checklist
Sorry, but no. I'm not familiar with
@redocly/openapi-core
. 😢The text was updated successfully, but these errors were encountered: