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

fix(quantic): babel async await plugin setup added to fix quantic issue with firefox #4620

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mmitiche
Copy link
Contributor

@mmitiche mmitiche commented Nov 1, 2024

SFINT-5784

continuation of @erocheleau 's work: #4363

As @erocheleau added in his PR:

Salesforce LWS has a problem with static resources files using async/await on Firefox, before this PR the search interface indefinitely loads in Firefox when LWS is enabled.

This PR adds a script to use Babel to transform the headless.js files we use to transform async to promises.

Add babel to quantic
Use babel plugin @babel/plugin-transform-async-to-generator to transform built headless.js to transform async to promise.
Added this step prior to running the copy-static-resource in the nx build script.

  • Made sure this is still working correctly with Quantic and Headless v3.
  • Confirmed that the size of the Headless bundle after applying the babel async await plugin is not significantly bigger.
  • Confirmed that the search interface loads properly in Firefox.

Before:

Screen.Recording.2024-11-05.at.3.45.35.PM.mov

After:

Screen.Recording.2024-11-05.at.3.49.03.PM.mov

Headless Size Before:

Screenshot 2024-11-05 at 3 29 43 PM

Headless Size After:

Screenshot 2024-11-05 at 3 29 59 PM

Copy link

github-actions bot commented Nov 1, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 236.7 236.7 0
commerce 341.3 341.3 0
search 412.5 412.5 0
insight 401.8 401.8 0
recommendation 249 249 0
ssr 406.2 406.2 0
ssr-commerce 353.6 353.6 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@mmitiche mmitiche changed the title chore(quantic): babel setup added chore(quantic): babel async await plugin setup added to fix quantic issue with firefox Nov 5, 2024
@mmitiche mmitiche changed the title chore(quantic): babel async await plugin setup added to fix quantic issue with firefox fix(quantic): babel async await plugin setup added to fix quantic issue with firefox Nov 5, 2024
@mmitiche mmitiche marked this pull request as ready for review November 5, 2024 20:59
@mmitiche mmitiche requested review from a team as code owners November 5, 2024 20:59
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.

1 participant