browser-metrics
browser-metrics copied to clipboard
Exports
Instead of recommending people to import from /lib/x
, why not export the modules?
import browserMetrics from 'browser-metrics';
// and
import { Metric } from 'browser-metrics';
Oups, sorry I have missed that issue.
My only concern with named import is with build size. Available tree shaking solutions have proven to be unreliable, e.g. those two issues linked in that comment: https://github.com/callemall/material-ui/pull/5545#issuecomment-260111140:
- Webpack: https://github.com/webpack/webpack/issues/2867
- Rollup: https://github.com/rollup/rollup/wiki/Troubleshooting#tree-shaking-doesnt-seem-to-be-working