You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #595 pulled inn @endemolshinegroup/cosmiconfig-typescript-loader we now transitively get the typescript dependency via ts-node in our project. This change increases node_modules size by ~57MB for module consumers, which seems a waste for everyone who are not running typescript. For us this ends up slowing down our CI runs by a small percent.
The proposed solution is to use the peerdependencyMeta field in package.json and declaring @endemolshinegroup/cosmiconfig-typescript-loader as an optional peer dependency. When configuring cosmicconfig, we detect if the dependency is installed using require.resolve and only then enable loading and setting up ts config files.
I'm pretty sure this would not make sense to handle downstream, since that project only works in a typescript context.
Would you consider a PR for this approach?
The text was updated successfully, but these errors were encountered:
After #595 pulled inn
@endemolshinegroup/cosmiconfig-typescript-loader
we now transitively get thetypescript
dependency viats-node
in our project. This change increases node_modules size by ~57MB for module consumers, which seems a waste for everyone who are not running typescript. For us this ends up slowing down our CI runs by a small percent.The proposed solution is to use the
peerdependencyMeta
field in package.json and declaring@endemolshinegroup/cosmiconfig-typescript-loader
as an optional peer dependency. When configuring cosmicconfig, we detect if the dependency is installed usingrequire.resolve
and only then enable loading and setting up ts config files.I'm pretty sure this would not make sense to handle downstream, since that project only works in a typescript context.
Would you consider a PR for this approach?
The text was updated successfully, but these errors were encountered: