Skip to content

Conversation

mkazlauskas
Copy link
Member

Sentry release tracking pollutes global scope by declaring 'e' variable, which can cause conflicts with dapp code when used in the injected script.

We were NOT using sentry in the content scripts, so this has no functional effect. The reason that this code was injected is because we were using the same webpack build configuration for both: Lace app scripts and content scripts. Webpack plugins extend compiler behavior globally (applies to all entrypoints).

Fixes #1988

Checklist

  • JIRA - LW-13599
  • Proper tests implemented
  • Screenshots added.

Proposed solution

Didn't find a way to apply the plugin for select entrypoints only.
Extract content script entrypoints into a new webpack configuration and build them separately.

Testing

See #1988

Sentry release tracking pollutes global scope by declaring 'e'
variable, which can cause conflicts with dapp code when used
in the injected script.

We were NOT using sentry in the content scripts, so this has
no functional effect. The reason that this code was injected
is because we were using the same webpack build configuration
for both: Lace app scripts and content scripts. Webpack plugins
extend compiler behavior globally (applies to all entrypoints).
@mkazlauskas mkazlauskas requested a review from a team as a code owner September 15, 2025 06:28
Copy link

@lace-bot
Copy link
Collaborator

lace-bot commented Sep 15, 2025

Allure Report

allure-report-publisher generated test report!

processReports: ❌ test report for b41027a3

passed failed skipped flaky total result
Total 32 1 4 0 37

@mkazlauskas mkazlauskas enabled auto-merge (squash) September 15, 2025 12:04
@mkazlauskas mkazlauskas merged commit c65a052 into main Sep 15, 2025
104 of 114 checks passed
@mkazlauskas mkazlauskas deleted the fix/injected-global-pollution branch September 15, 2025 12:13
mchappell pushed a commit that referenced this pull request Sep 15, 2025
Sentry release tracking pollutes global scope by declaring 'e'
variable, which can cause conflicts with dapp code when used
in the injected script.

We were NOT using sentry in the content scripts, so this has
no functional effect. The reason that this code was injected
is because we were using the same webpack build configuration
for both: Lace app scripts and content scripts. Webpack plugins
extend compiler behavior globally (applies to all entrypoints).
rhyslbw pushed a commit that referenced this pull request Sep 18, 2025
Sentry release tracking pollutes global scope by declaring 'e'
variable, which can cause conflicts with dapp code when used
in the injected script.

We were NOT using sentry in the content scripts, so this has
no functional effect. The reason that this code was injected
is because we were using the same webpack build configuration
for both: Lace app scripts and content scripts. Webpack plugins
extend compiler behavior globally (applies to all entrypoints).
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.

Lace is preventing Reddit from loading
5 participants