rspack_plugin_web_worker_template 0.7.11

rspack web worker plugin
Documentation
1
2
3
4
5
6
7
use rspack_core::{BoxPlugin, ChunkLoadingType, PluginExt};
use rspack_plugin_runtime::{ArrayPushCallbackChunkFormatPlugin, enable_chunk_loading_plugin};

pub fn web_worker_template_plugin(plugins: &mut Vec<BoxPlugin>) {
  plugins.push(ArrayPushCallbackChunkFormatPlugin::default().boxed());
  enable_chunk_loading_plugin(ChunkLoadingType::ImportScripts, plugins);
}