sentry-javascript icon indicating copy to clipboard operation
sentry-javascript copied to clipboard

Do not use wildcard imports

Open pure-engineering opened this issue 7 years ago • 2 comments

Do you have any plans to avoid wildcard imports? Such as:

import * as Sentry from '@sentry/browser';

pure-engineering avatar Jan 24 '19 21:01 pure-engineering

Not in this major release. Sentry SDK doesnt contain a standalone functions which could be tree-shaken.

kamilogorek avatar Jan 25 '19 08:01 kamilogorek

I am not sure where this issue is going, no one stops you from just importing the function you want to use like

import { captureMessage } from '@sentry/browser';

We also provide a (non documented yet) esm build which should help with tree-shaking.

HazAT avatar Feb 06 '19 07:02 HazAT