-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Hi, thanks for this great library. After analysing our bundle we found that including reading-time via ESM imports as recommended causes several node dependencies (namely stream) to be included when building our Next.js app. My best guess would be that this is because the main barrel file imports the stream version as well and that import breaks treeshaking. This could be fixed multiple ways, probably the most low effort way would be creating two additional different barrel files (e.g. reading-time/browser and reading-time/node) that only export the necessary stuff.
Metadata
Metadata
Assignees
Labels
No labels