Skip to content

Add replay bundles, keep standard ones without replay#1380

Merged
matux merged 1 commit into
masterfrom
matux/replay-browser
Oct 14, 2025
Merged

Add replay bundles, keep standard ones without replay#1380
matux merged 1 commit into
masterfrom
matux/replay-browser

Conversation

@matux

@matux matux commented Oct 14, 2025

Copy link
Copy Markdown
Contributor

Description of the change

This pull request introduces a new Replay bundle to the Rollbar JavaScript SDK, along with the necessary build configuration and package exports. The main changes add support for the Replay feature as a separately bundled module, update the build system to generate Replay-specific outputs, and adjust the main package to reference these new bundles.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

@matux matux requested a review from Copilot October 14, 2025 22:01
@matux matux self-assigned this Oct 14, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Replay bundle to the Rollbar JavaScript SDK, allowing the Replay feature to be distributed as a separate module while keeping the standard bundles lightweight without replay functionality.

  • Separated Replay functionality into dedicated bundles with their own webpack configurations
  • Created new entry points and bundle files for Replay-enabled Rollbar instances
  • Updated package.json to export the new Replay bundles through the "./replay" path

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
webpack.config.cjs Added webpack configurations for generating Replay-specific bundles (vanilla, UMD, and no-conflict variants)
src/browser/rollbarReplay.js New main Rollbar instance that includes the Replay component alongside other core components
src/browser/rollbar.js Removed Replay import and component registration to keep standard bundles lightweight
src/browser/bundles/rollbarReplay.noconflict.js New no-conflict bundle entry point for Replay functionality
src/browser/bundles/rollbarReplay.js New standard bundle entry point for Replay functionality with global setup
package.json Added "./replay" export path pointing to the new Replay bundles

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread webpack.config.cjs Outdated
Comment on lines +236 to +242
function addUMDReplayToConfig(webpackConfig, filename, extraPlugins, minimizer) {
const replayConfig = extend({}, UMDReplayConfigBase);
replayConfig.plugins = extraPlugins;
replayConfig.optimization = optimizationConfig(minimizer);
replayConfig.output = extend({ filename: filename }, replayConfig.output);
webpackConfig.push(replayConfig);
}

Copilot AI Oct 14, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing name property assignment in addUMDReplayToConfig. Other similar functions like addVanillaReplayToConfig set replayConfig.name = filename which should be consistent across all config functions.

Copilot uses AI. Check for mistakes.
Comment thread webpack.config.cjs Outdated
Comment on lines +244 to +250
function addNoConflictReplayToConfig(webpackConfig, filename, extraPlugins, minimizer) {
const replayConfig = extend({}, noConflictReplayConfigBase);
replayConfig.plugins = extraPlugins;
replayConfig.optimization = optimizationConfig(minimizer);
replayConfig.output = extend({ filename: filename }, replayConfig.output);
webpackConfig.push(replayConfig);
}

Copilot AI Oct 14, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing name property assignment in addNoConflictReplayToConfig. Other similar functions like addVanillaReplayToConfig set replayConfig.name = filename which should be consistent across all config functions.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not consistent in this regard across this config. I'll fix this in a subsequent PR where I refactor the config.

@matux matux force-pushed the matux/replay-browser branch from 721f13b to 179cb59 Compare October 14, 2025 23:24
@matux matux enabled auto-merge (squash) October 14, 2025 23:25
@matux matux merged commit 3f15194 into master Oct 14, 2025
6 checks passed
@matux matux deleted the matux/replay-browser branch October 14, 2025 23:28
matux added a commit that referenced this pull request Oct 15, 2025
matux added a commit that referenced this pull request Oct 15, 2025
* Revert "Add replay bundles, keep standard ones without replay (#1380)"
This reverts commit 3f15194.

* Revert "New dist with replay bundles"
This reverts commit 035c8a2.
@waltjones waltjones restored the matux/replay-browser branch October 16, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants