top | item 37816738

(no title)

TheSisb2 | 2 years ago

In between barrel files and no barrel files, are unbarrelled files. This is where you have one installable package (i.e.: @cool-lib/core) and create imports from sub-paths like this:

import Button from "@cool-lib/core/button";

import Link from "@cool-lib/core/link";

import Widget from "@cool-lib/core/widget";

This is similar to what lodash does too. Still have more imports, but only one package.json dependency! And the same perf gains.

discuss

order

No comments yet.