BranchMetrics / web-branch-deep-linking-attribution

The Branch Web SDK for deep linking and attribution. Once initialized, the Branch Web SDK allows you to create and share links with a banner (web only), over SMS, or your own methods by generating deep links. It also offers event tracking, access to referrals, and management of credits.
https://help.branch.io/developers-hub/docs/web-sdk-overview
MIT License
287 stars 101 forks source link

fix(core): fix issue with minification #1016

Closed JagadeeshKaricherla-branch closed 2 months ago

JagadeeshKaricherla-branch commented 2 months ago

Fix issue with dot notation for object properties not properly minified by Google closure compiler.

Google closure compiler we use for js minification have issues retaining the key names if dot notation is used in Advanced minification mode.The fix is to use [] way of adding properties inplace of dot notation.

Before : eventData.bannerHeight = journeys_utils.bannerHeight; After : eventData['bannerHeight'] = journeys_utils.bannerHeight;

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

JS Budget Check

Please mention the size in kb before abd after this PR

Files Before After
dist/build.js.
dist/build.min.js

Checklist:

Mentions:

List the person or team responsible for reviewing proposed changes.

cc @BranchMetrics/saas-sdk-devs for visibility.