-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 Webpack bundling of recorder worklet #21239
Conversation
WalkthroughWalkthroughThe changes focus on addressing issues with the Changes
Assessment against linked issues
Overall, the updates ensure compatibility with Webpack's configurations and resolve the issue related to module specifiers, thereby fixing the voice input microphone issue outlined in the linked issue #21234. Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (5)
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
PS - I was only able to do limited testing here and also just manually examine the Webpack output. It would help if someone could verify voice input works for both the modern and legacy builds. cc @silamon |
Co-authored-by: Simon Lamon <[email protected]>
NM.... found my headset and fully tested now. Errors are gone and both builds load the worklet. |
Proposed change
Webpack is not currently parsing the audio recorder worklet for imports or creating a proper chunk. It happened to work prior to #20676 for the modern build because there were luckily no imports of polyfills or Babel helpers. The legacy version never could have worked.
This adjusts the code which adds the worklet and the Webpack config to fix that problem. Also, it keeps the worklet from splitting because of several bugs in Webpack related to loading any external chunks. The worklet is small enough that this doesn't really matter.
So this fixes the regression for the modern build and also gets it working for the legacy build. A follow up could better transpile the worklet similar to #21177 and also implement better feature detection instead of a try/catch.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
Bug Fixes
AudioRecorder
context creation logic and module loading syntax.Refactor
Style