Post

🆕 npx unbarrelify At last, an easy way get rid of barrel files! Rewrites consumers to import directly from source, then deletes the barrels. Safe and fully automated, read all about it at github.com/webpro/unbar...

Barrel files make sense for libraries but that's about it. Ideally the tooling should support better tree-shaking instead of having dozens of compile targets and entry points in your package.json

Ivan, you might be confusing entry points with barrel files. What the tool does, is remove barrel files, but not those that are entry points.

Feeling nerd-sniped here.. Obviously can't see/rewrite external consumers of a package (except within monorepo), but an option to modify package.json#exports and go the extra mile might still be interesting to explore

0 reposts3 likes

No replies yet.