-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(quantic): babel async await plugin setup added to fix quantic iss…
…ue with firefox (#4620) ## [SFINT-5784](https://coveord.atlassian.net/browse/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: https://github.com/user-attachments/assets/e6471fd9-d219-42ca-be93-05d2972e7937 ### After: https://github.com/user-attachments/assets/f5c880b0-c164-473d-88ad-3de62efd0bee ### Headless Size Before: <img width="500" alt="Screenshot 2024-11-05 at 3 29 43 PM" src="https://github.com/user-attachments/assets/371ecfa6-898c-4486-a97d-68dbc4b42f1f"> ### Headless Size After: <img width="500" alt="Screenshot 2024-11-05 at 3 29 59 PM" src="https://github.com/user-attachments/assets/a71c0ba9-163c-48b3-a2c7-7a231ad6122a"> [SFINT-5784]: https://coveord.atlassian.net/browse/SFINT-5784?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
Showing
5 changed files
with
245 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["@babel/plugin-transform-async-to-generator"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters