-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add web worker offloading plugin #1247
base: trunk
Are you sure you want to change the base?
Conversation
b1229da
to
88ff247
Compare
@westonruter @adamsilverstein I have converted this into a standalone plugin. Next, I'll add a settings page to opt-in offloading for scripts listed in the Partytown documentation (https://partytown.builder.io/common-services). This way, the WordPress plugin team won't classify it as a "framework" plugin, as @westonruter previously mentioned. |
9d4c497
to
e7668c6
Compare
* Web Worker module allows to run scripts within a worker thread with the help of Partytown library.
* Replace output buffering with get_echo() function * Update creation of expected string of script tag with type="text/partytown"
* Removed scripts from done items in global $wp_scripts
- Include partytown library files at plugin release.
c06df49
to
edaa305
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @alessandrocarrera, @erip2, @Chiflaos. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Summary
Fixes #176
Previously: #556
Relevant technical choices
wwo_configuration
filter which can be used to update web worker configurations.Testing steps
Enable this performance plugin or use
wp-env
in which this plugin is enabled by default on this branch.Add a JS script with
web-worker-offloader
as a dependency. When the page is loaded, the JS script should be loaded within the web worker.Use
wwo_configuration
hook to update web worker configurations.