Comments (5)
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.
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.
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.
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.
ah gotcha, no that's not what I would want to do. why does it inline devDeps?
from microbundle.
Related Issues (20)
- Using for of loop adds ~300 bytes of polyfill code HOT 5
- CSS var default `transparent` becomes `#0000` (Version 0.15.1) HOT 4
- Environment variables HOT 3
- Facing difficulty in using my bundled package HOT 2
- inline of dependency leads to failed imports in source HOT 14
- No name was provided for external module 'preact/compat' HOT 2
- Build for React Server Components HOT 7
- Alias are specific only? HOT 2
- Wrong "import" in UMD bundle of UMD package HOT 8
- 打包后的产物 x.moduel.mjs 存在箭头函数,导致IE 无法兼容 HOT 3
- Add `x_google_ignoreList` (Ignore-listing code) support to sourcemaps HOT 9
- update rollup from 2.35.1 (2020-12-14) to at least 3.16.0 (2023-02-17), or ideally latest (4.6.1, 2023-11-30) HOT 12
- Dymanic imports not working in next.js and webpack applications HOT 2
- [typing import error][help wanted] The {{ package-name }} library may need to update its package.json or typings. HOT 8
- How can I include SVGs into my build? HOT 16
- Using React 17 or 18 i get the following error rpt2: options error TS5089: Option 'jsxFactory' cannot be specified when option 'jsx' is 'react-jsx'. HOT 1
- prevent export merge HOT 5
- Microbundle is awesome!
- Error when using file JS built by microbundle "Uncaught ReferenceError: require is not defined" HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microbundle.