Closed danawoodman closed 7 months ago
Is that an error, or a warning? Unless I'm misremembering, Rollup only emits that as a warning, it shouldn't stop builds.
Edit: Looks like the builds complete without error. Keep in mind you're inlining @sentry/browser
(not sure if you intend to or not) which is massive -- trying to do that in CodeSandbox might cause problems if you're seeing some.
Yeah, I realized that this was a false positive and there was some other hidden issue that was causing the build to fail, so it was just a warning.
The docs state to use Sentry browser exactly like this: https://github.com/getsentry/sentry-javascript/tree/master/packages/browser
Thanks for having a look!
The JS usage was fine, I was just asking if you meant to inline the dep.
Microbundle, by default, will inline all devDependencies
into your bundle -- for @sentry/browser
, this is merging 65kb+ into your library, which is pretty sizable. Seems like something you'd want at the page level, not inlined into your library.
ah gotcha, no that's not what I would want to do. why does it inline devDeps?
Because no other behavior really makes sense there.
If you're consuming lib A, but it isn't listed as a dependency
(so NPM, CDNs, etc. won't pull it when users download/install your lib), how would it become available?
peerDeps
signals the consumer should have it, deps
signals the consumer will need to pull it, using devDeps
therefore signals it needs to be included for the consumer.
Edit: Just to clarify, it of course only inlines devDeps you're actually consuming in your lib code. Prettier, etc. won't end up in your bundle or anything.
When using microbundle to build a TypeScript project with @sentry/browser I get the following errors repeatedly until everything fails:
All you have to do to reproduce is install and import @sentry/browser
Reproduction here