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
We currently don't support code splitting in web workers via import(), because the bundle loader for JS relies on the DOM. We should extend this to also support web workers.
In order to be consistent about how require() works, we won't make it automatically create a split point when called in a worker, as that would cause the code to potentially be removed from another bundle. But if you use import() to load the shared module in both the main bundle and a worker, the module would be placed into its own bundle and loaded in both places.
We currently don't support code splitting in web workers via
import()
, because the bundle loader for JS relies on the DOM. We should extend this to also support web workers.This will allow moving common dependencies between workers, or even between workers and the main process to a separate bundle so it only gets loaded once. See https://twitter.com/DasSurma/status/1013489346090012672. cc. @surma.
In order to be consistent about how
require()
works, we won't make it automatically create a split point when called in a worker, as that would cause the code to potentially be removed from another bundle. But if you useimport()
to load the shared module in both the main bundle and a worker, the module would be placed into its own bundle and loaded in both places.Related: #758
The text was updated successfully, but these errors were encountered: