feat(browser): Add shim package for logs#18831
Merged
Conversation
Contributor
size-limit report 📦
|
Contributor
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
Lms24
reviewed
Jan 16, 2026
Comment on lines
46
to
49
| consoleSandbox(() => { | ||
| // eslint-disable-next-line no-console | ||
| console.warn('You are using consoleLoggingIntegration() even though this bundle does not include logs.'); | ||
| }); |
Member
There was a problem hiding this comment.
hmm I know we also do this in other shims but I'm wondering if we should instead guard these logs with DEBUG_BUILD. My thinking is:
- We export dedicated
.debugbundle variants - When using the loader, users can toggle debug logging
- End users should probably not get these warnings in their console, just because our users decided to not use the feature. This is especially relevant for the loader use case.
- This helps keep the CDN bundle size increase at a minimum, since we can tree-shake out the logs for the normal bundles
WDYT? Am I missing something?
Member
Author
There was a problem hiding this comment.
Yeah that makes sense, I'll update that
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
...ges/browser-integration-tests/suites/public-api/logger/consoleLoggingIntegrationShim/test.ts
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a shim for the
loggernamespace since we'll soon ship the logs bundle in the loader and want to avoid breaking user apps when they switch back to a bundle that does not include logscloses #18826