You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a plugin that provides a simple API for using web workers from your application code.
Typically, web worker scripts will be generated in a separate build, or minimally by defining a separate entry-point. This can prove cumbersome, especially since there's boilerplate to setup for message passing, and lots of associated build config to get right.
This plugin will alleviate these issues by fulfilling the following requirements:
provide a require.worker("./path/to/worker") mechanism in app code
set up a separate, specialized entry point for the specified worker module automatically (which will be bundled as normal)
replace require.worker("./path/to/worker") with a dynamically generated module that looks something like:
allow access to split bundles from inside the web worker by inserting a runtime module provider that uses the importScripts global function instead of creating <script> tags
the worker should be configurable, such that a SharedWorker can be created instead [0][1]
The text was updated successfully, but these errors were encountered:
Create a plugin that provides a simple API for using web workers from your application code.
Typically, web worker scripts will be generated in a separate build, or minimally by defining a separate entry-point. This can prove cumbersome, especially since there's boilerplate to setup for message passing, and lots of associated build config to get right.
This plugin will alleviate these issues by fulfilling the following requirements:
require.worker("./path/to/worker")
mechanism in app coderequire.worker("./path/to/worker")
with a dynamically generated module that looks something like:importScripts
global function instead of creating<script>
tagsSharedWorker
can be created instead [0] [1]The text was updated successfully, but these errors were encountered: