-
-
Notifications
You must be signed in to change notification settings - Fork 232
docs: add web workers browser compatibility tips #6282
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
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds documentation about browser compatibility considerations when using Web Workers with polyfills. It explains that the entry polyfill mode doesn't work with Web Workers due to thread isolation, and recommends using the usage mode instead.
- Adds browser compatibility sections to both English and Chinese Web Workers documentation
- Includes tip boxes in polyfill configuration documentation explaining the Web Workers limitation
- Provides code examples showing how to configure the
usagepolyfill mode
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| website/docs/zh/guide/basic/web-workers.mdx | Adds Chinese browser compatibility section with explanation and config example |
| website/docs/en/guide/basic/web-workers.mdx | Adds English browser compatibility section with explanation and config example |
| website/docs/zh/config/output/polyfill.mdx | Adds Chinese tip about Web Workers polyfill limitation |
| website/docs/en/config/output/polyfill.mdx | Adds English tip about Web Workers polyfill limitation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: neverland <chenjiahan.jait@bytedance.com>
chenjiahan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM

Summary
When bundle page with Web Workers, the
entrymode is not applicable to Web Workers because the Web Workers thread is isolated from the main thread (page), and theusagemode can be used at this time.Related Links
Checklist