oliviertassinari / browser-metrics

A collection of metrics tools for measuring performance ⚡️
125 stars 5 forks source link

Exports #1

Open mxstbr opened 7 years ago

mxstbr commented 7 years ago

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';
oliviertassinari commented 7 years ago

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: