Coder Social home page Coder Social logo

Comments (5)

rschristian avatar rschristian commented on June 11, 2024 1

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.

from microbundle.

rschristian avatar rschristian commented on June 11, 2024

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.

from microbundle.

danawoodman avatar danawoodman commented on June 11, 2024

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!

from microbundle.

rschristian avatar rschristian commented on June 11, 2024

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.

from microbundle.

danawoodman avatar danawoodman commented on June 11, 2024

ah gotcha, no that's not what I would want to do. why does it inline devDeps?

from microbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.