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
I haven't seen a compelling argument to use one. People have suggested that bundling libraries means that the packages are smaller and there is better compatbility with supporting both CommonJS, ESM and even UMD. But It's not actually clear to me whether this is a real problem for more recent npm packages anyway?
If you are going to write a web app where the size of the depenencies will matter, you will have a bundler anyway? If your dependencies are themselves bundled, their dependencies probably will not be de-duplicated by your own bundler. So I don't really buy this argument. It seems like there is just an obsession to save bytes for no purpose and to create tooling that doesn't actually match up with npm. https://cmdcolin.github.io/posts/2022-05-27-youmaynotneedabundler.
For our project, we tried to use rollup and add typebox as an external peer dependency using @rollup/plugin-node-resolve. However, this will not work when you try to use the bundled library in another project that has a subdependency that is installed first which doesn't use the same version of typebox as you. And there doesn't seem to be an obvious way to fix that at all. The tooling is inadequate and a waste of time. And is probably quite damaging in other ways (dependants not being able to override dependencies and all).
The text was updated successfully, but these errors were encountered:
I haven't seen a compelling argument to use one. People have suggested that bundling libraries means that the packages are smaller and there is better compatbility with supporting both CommonJS, ESM and even UMD. But It's not actually clear to me whether this is a real problem for more recent npm packages anyway?
If you are going to write a web app where the size of the depenencies will matter, you will have a bundler anyway? If your dependencies are themselves bundled, their dependencies probably will not be de-duplicated by your own bundler. So I don't really buy this argument. It seems like there is just an obsession to save bytes for no purpose and to create tooling that doesn't actually match up with npm. https://cmdcolin.github.io/posts/2022-05-27-youmaynotneedabundler.
For our project, we tried to use rollup and add typebox as an external peer dependency using
@rollup/plugin-node-resolve
. However, this will not work when you try to use the bundled library in another project that has a subdependency that is installed first which doesn't use the same version of typebox as you. And there doesn't seem to be an obvious way to fix that at all. The tooling is inadequate and a waste of time. And is probably quite damaging in other ways (dependants not being able to override dependencies and all).The text was updated successfully, but these errors were encountered: