Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [RUM-8428] Make developer extension compatible with lazy loaded recorder module #3324

Merged

Conversation

sethfowler-datadog
Copy link
Contributor

Motivation

Lazy loading the recorder extension involves dynamically import()ing the module from a separate JS chunk, stored at a separate URL. The developer extension doesn’t know about this URL, so it doesn’t redirect it to the version served by yarn dev appropriately, breaking local development.

Changes

This PR fixes the problem by making two changes:

  1. Updating our webpack configuration to remove the context hash from the recorder chunk filename in local development, so that it gets hosted at a consistent localhost URL. (Nothing has changed in production builds.)
  2. Updating the developer extension to redirect fetches of the recorder chunk to the appropriate localhost URL when local development is enabled.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@sethfowler-datadog sethfowler-datadog requested a review from a team as a code owner February 5, 2025 14:20
webpack.base.js Outdated Show resolved Hide resolved
@sethfowler-datadog sethfowler-datadog merged commit b7fcfcb into main Feb 6, 2025
19 checks passed
@sethfowler-datadog sethfowler-datadog deleted the seth.fowler/lazy-load-recorder-dev-extension-fix branch February 6, 2025 09:29
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