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(headless): add globalThis shim to quanticUmd build to fix a bug with Locker Service #4701

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

erocheleau
Copy link
Collaborator

@erocheleau erocheleau commented Nov 22, 2024

Locker Service doesn't support globalThis but this was added to the library coveo.analytics.js in the last version.

This meant all of Quantic components didn't load with Locker turned on.

This also made us realize that all of our Quantic test are only running with LWS and not Locker, while the SFINT package tests are running on Locker.

At least this way we cover both environments. Out of scope for this PR, but in the future we will probably revert to testing on Locker with Quantic too, and perhaps had smoke tests with LWS.

LWS being the "more recent" of the two, we expect less issues with LWS than with Locker.

image

Copy link

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 241.4 241.4 0
commerce 346 346 0
search 413 413 0
insight 403.8 403.8 0
recommendation 253.6 253.6 0
ssr 406.5 406.5 0
ssr-commerce 358.3 358.3 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

@erocheleau
Copy link
Collaborator Author

I can attest that CI works with this branch when the Scratch org runs LWS.
image

I will update the config to run with Locker instead and see if everything still works, I will leave it like that until we implement an LWS environment. (I'm more afraid of Locker than LWS...)

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