I have created npm packages before but I struggled to turn this into a package that the utilities can be imported from for the following reason.
Dependency handling
I think for this repo specifically it would make sense to target a minimum version of remix v2.0 because remix-utils and the types for the loader function args are different.
Where I'm struggling is setting up peer dependencies so that it always requires these minimum versions of remix-utils and @remix-run/* packages.
Its really important that the same version of these packages is used as the user's dependencies in their projects this would be imported to because it could cause some issues when the versions are mismatched.
If you need a starter template for npm packages check out this one which is what I use when I need to do this kind of work
PR's are definitely welcome on this one, or even if you want to publish your own library to your own GitHub repo I would happy link to it at the top if this repo's README.
I have created npm packages before but I struggled to turn this into a package that the utilities can be imported from for the following reason.
Dependency handling
I think for this repo specifically it would make sense to target a minimum version of remix v2.0 because remix-utils and the types for the loader function args are different.
Where I'm struggling is setting up peer dependencies so that it always requires these minimum versions of remix-utils and @remix-run/* packages.
Its really important that the same version of these packages is used as the user's dependencies in their projects this would be imported to because it could cause some issues when the versions are mismatched.
If you need a starter template for npm packages check out this one which is what I use when I need to do this kind of work
PR's are definitely welcome on this one, or even if you want to publish your own library to your own GitHub repo I would happy link to it at the top if this repo's README.